39. Custom exception handling - Part 1 (#3)
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
package net.shyshkin.study.fullstack.supportportal.backend.exception;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.shyshkin.study.fullstack.supportportal.backend.controller.UserResource;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
@Slf4j
|
||||
@RestControllerAdvice(basePackageClasses = {UserResource.class})
|
||||
public class ExceptionHandling {
|
||||
private static final String ACCOUNT_LOCKED = "Your account has been locked. Please contact administration";
|
||||
private static final String METHOD_IS_NOT_ALLOWED = "This request method is not allowed on this endpoint. Please send a '%s' request";
|
||||
private static final String INTERNAL_SERVER_ERROR_MSG = "An error occurred while processing the request";
|
||||
private static final String INCORRECT_CREDENTIALS = "Username / password incorrect. Please try again";
|
||||
private static final String ACCOUNT_DISABLED ="Your account has been disabled. If this is an error, please contact administration";
|
||||
private static final String ERROR_PROCESSING_FILE = "Error occurred while processing file";
|
||||
private static final String NOT_ENOUGH_PERMISSION = "You do not have enough permission";
|
||||
}
|
||||
Reference in New Issue
Block a user