NCBACK-33 #16
@@ -70,6 +70,9 @@ public class ApiController {
|
||||
return ResponseEntity.ok().body(response);
|
||||
} catch (ValidationException e) {
|
||||
return createValidationErrorResponse(e.getBindingResult(), e.getMsgId());
|
||||
} catch (UserNotFoundException e) {
|
||||
return ResponseEntity.ok().body(new BaseResponse(msgId, MessageCode.USER_NOT_FOUND.getCode(),
|
||||
MessageCode.USER_NOT_FOUND.getDescription(), new HashMap<>()));
|
||||
} catch (NotFoundAuthToken e) {
|
||||
return ResponseEntity.ok().body(new BaseResponse(msgId, MessageCode.AUTH_TOKEN_NOT_FOUND.getCode(),
|
||||
MessageCode.AUTH_TOKEN_NOT_FOUND.getDescription(), new HashMap<>()));
|
||||
|
||||
@@ -11,6 +11,7 @@ public enum MessageCode {
|
||||
FILE_UPLOAD_ERROR(2, "File upload error"),
|
||||
FILE_DOWNLOAD_ERROR(2, "File download error"),
|
||||
USER_NOT_VERIFIED(2, "User not verified"),
|
||||
USER_NOT_FOUND(2, "User not found"),
|
||||
FILE_DOWNLOAD_ERROR_NOT_CORRECT_FIELD(2, "Not correct field"),
|
||||
IMAGE_FOUND_ERROR(2, "Image found error"),
|
||||
INVALID_JSON_BODY(2, "Invalid fields in JSON object"),
|
||||
|
||||
Reference in New Issue
Block a user