added new endpoints, getUser, getUserHistories, getBookmarks
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package com.safeqr.app.exceptions;
|
||||
|
||||
public class CustomNotFoundExceptions extends RuntimeException {
|
||||
public CustomNotFoundExceptions(String message){
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
@ControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
@ExceptionHandler(QRCodeExceptions.class)
|
||||
public ResponseEntity<ErrorResponse> handleQRCodeNotFoundException(QRCodeExceptions e) {
|
||||
@ExceptionHandler(CustomNotFoundExceptions.class)
|
||||
public ResponseEntity<ErrorResponse> handleResourceNotFoundException(CustomNotFoundExceptions e) {
|
||||
return new ResponseEntity<>(new ErrorResponse(e.getMessage(), HttpStatus.NOT_FOUND.value()), HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.safeqr.app.exceptions;
|
||||
|
||||
public class QRCodeExceptions extends RuntimeException {
|
||||
public QRCodeExceptions(String message){
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user