Skip navigation links
A B C D E G H I L M N P R S T U V W 

A

ACCESS_DENIED - Static variable in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
When the client is not authorized to access a protected resource.
ACCOUNT_EXPIRED - Static variable in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
When the user account is expired.
adapt(HttpError) - Method in class me.alidg.errors.adapter.DefaultHttpErrorAttributesAdapter
Converts the given HttpError to a Map.
adapt(HttpError) - Method in interface me.alidg.errors.adapter.HttpErrorAttributesAdapter
Converts the given HttpError instance to a Map.
AnnotatedWebErrorHandler - Class in me.alidg.errors.handlers
WebErrorHandler implementation responsible for handling exceptions annotated with the ExceptionMapping annotation.
AnnotatedWebErrorHandler() - Constructor for class me.alidg.errors.handlers.AnnotatedWebErrorHandler
 
AUTH_REQUIRED - Static variable in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
When someone tried to access a protected resource without proper authorization.
AutoConfigureErrors - Annotation Type in me.alidg.errors.annotation
Auto-configuration imports to enable web error handlers support for Spring MVC tests.

B

BAD_CREDENTIALS - Static variable in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
When the given user credentials where wrong.

C

canHandle(Throwable) - Method in class me.alidg.errors.handlers.AnnotatedWebErrorHandler
Only can handle non-null exceptions annotated with ExceptionMapping annotation.
canHandle(Throwable) - Method in class me.alidg.errors.handlers.ConstraintViolationWebErrorHandler
Only can handle ConstraintViolationExceptions that contains at least one ConstraintViolation.
canHandle(Throwable) - Method in enum me.alidg.errors.handlers.LastResortWebErrorHandler
Since this is the last resort error handler, this value would simply be ignored.
canHandle(Throwable) - Method in class me.alidg.errors.handlers.MissingRequestParametersWebErrorHandler
Only can handle exceptions about missing required headers, cookies or matrix variables.
canHandle(Throwable) - Method in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
Only handles ServletExceptions and HttpMessageNotReadableExceptions.
canHandle(Throwable) - Method in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
Can only handle AccessDeniedException or AuthenticationExceptions.
canHandle(Throwable) - Method in class me.alidg.errors.handlers.SpringValidationWebErrorHandler
Can only handle supported exceptions mentioned above.
canHandle(Throwable) - Method in interface me.alidg.errors.WebErrorHandler
Determines whether this particular implementation can handle the given exception or not.
CodedMessage(String, String) - Constructor for class me.alidg.errors.HttpError.CodedMessage
 
ConstraintViolationWebErrorHandler - Class in me.alidg.errors.handlers
A WebErrorHandler implementation responsible for handling ConstraintViolationExceptions from bean validation.
ConstraintViolationWebErrorHandler() - Constructor for class me.alidg.errors.handlers.ConstraintViolationWebErrorHandler
 

D

DefaultHttpErrorAttributesAdapter - Class in me.alidg.errors.adapter
Default implementation of HttpErrorAttributesAdapter which converts the given HttpError to a Map like following:
DefaultHttpErrorAttributesAdapter() - Constructor for class me.alidg.errors.adapter.DefaultHttpErrorAttributesAdapter
 

E

equals(Object) - Method in class me.alidg.errors.HttpError.CodedMessage
 
errorAttributes(WebErrorHandlers, HttpErrorAttributesAdapter) - Method in class me.alidg.errors.conf.ErrorsAutoConfiguration
Registers a ErrorAttributes implementation which would replace the default one provided by the Spring Boot.
ErrorsAutoConfiguration - Class in me.alidg.errors.conf
Auto-configuration responsible for registering a WebErrorHandlers filled with builtin, custom and default fallback WebErrorHandlers.
ErrorsAutoConfiguration() - Constructor for class me.alidg.errors.conf.ErrorsAutoConfiguration
 
errorsControllerAdvice(WebErrorHandlers, HttpErrorAttributesAdapter) - Method in class me.alidg.errors.conf.ErrorsAutoConfiguration
Registers a RestControllerAdvice to catch all exceptions thrown by the web layer.
ErrorsControllerAdvice - Class in me.alidg.errors.mvc
Tries its best to catch and handle all exceptions thrown inside the Web layer using WebErrorHandlers assistance.
ErrorsControllerAdvice(WebErrorHandlers, HttpErrorAttributesAdapter) - Constructor for class me.alidg.errors.mvc.ErrorsControllerAdvice
Initializing the rest controller advice by injecting the WebErrorHandlers bean.
ErrorsEnvironmentPostProcessor - Class in me.alidg.errors.conf
A custom EnvironmentPostProcessor which allows to override a particular bean definition, e.g.
ErrorsEnvironmentPostProcessor() - Constructor for class me.alidg.errors.conf.ErrorsEnvironmentPostProcessor
 
ExceptionMapping - Annotation Type in me.alidg.errors.annotation
When an exception annotated with this annotation happens, the metadata encapsulated in the annotation would help us to transform the language level exception to REST API error code/status code combination.
ExceptionRefiner - Interface in me.alidg.errors
Defines a contract to refine exceptions.
ExposeAsArg - Annotation Type in me.alidg.errors.annotation
Annotate fields/methods inside an exception with this annotation to expose its value or return value for message interpolation.

G

getArguments() - Method in class me.alidg.errors.HandledException
 
getCode() - Method in class me.alidg.errors.HttpError.CodedMessage
 
getErrorAttributes(WebRequest, boolean) - Method in class me.alidg.errors.adapter.HttpErrorAttributes
Extracts the thrown exception from the request attributes.
getErrorCodes() - Method in class me.alidg.errors.HandledException
 
getErrors() - Method in class me.alidg.errors.HttpError
 
getHttpStatus() - Method in class me.alidg.errors.HttpError
 
getMessage() - Method in class me.alidg.errors.HttpError.CodedMessage
 
getStatusCode() - Method in class me.alidg.errors.HandledException
 

H

handle(Throwable) - Method in class me.alidg.errors.handlers.AnnotatedWebErrorHandler
Handles the thrown exception annotated with ExceptionMapping by using the ExceptionMapping.errorCode() as the error code, the ExceptionMapping.statusCode() as the HTTP status code and also, exposing exception members annotated with ExposeAsArg.
handle(Throwable) - Method in class me.alidg.errors.handlers.ConstraintViolationWebErrorHandler
Handles the given ConstraintViolationExceptions by extracting the error codes from the message templates and also, extracting the arguments from ConstraintDescriptors.
handle(Throwable) - Method in enum me.alidg.errors.handlers.LastResortWebErrorHandler
Always return 500 Internal Error with unknown_error as the error code with no arguments.
handle(Throwable) - Method in class me.alidg.errors.handlers.MissingRequestParametersWebErrorHandler
Handles the given exception by selecting the appropriate error code, status code and to-be-exposed arguments conditionally.
handle(Throwable) - Method in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
Bunch of if-else-es to return an appropriate HandledException based on the nature of the given exception.
handle(Throwable) - Method in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
Bunch of if-else-es to handle Spring Security specific exceptions.
handle(Throwable) - Method in class me.alidg.errors.handlers.SpringValidationWebErrorHandler
After extracting the BindingResult from the exception, would iterate over all errors and pack all validation errors with their corresponding to be exposed arguments.
handle(Throwable) - Method in interface me.alidg.errors.WebErrorHandler
Handles the given exception and returns an instance of HandledException.
handle(Throwable, Locale) - Method in class me.alidg.errors.WebErrorHandlers
Given any exception, first it would select an appropriate exception handler or falls back to a default handler and then tries to handle the exception using the chosen handler.
HandledException - Class in me.alidg.errors
Encapsulates details about a handled exception, including: The mapped business level error codes The corresponding HTTP status code A collection of arguments that can be used for message translation
HandledException(Set<String>, HttpStatus, Map<String, List<?>>) - Constructor for class me.alidg.errors.HandledException
Initialize a handled exception with a set of error codes, a HTTP status code and an optional collection of arguments.
HandledException(String, HttpStatus, Map<String, List<?>>) - Constructor for class me.alidg.errors.HandledException
Initialize a handled exception with an error code, a HTTP status code and an optional collection of arguments.
handleException(Throwable, Locale) - Method in class me.alidg.errors.mvc.ErrorsControllerAdvice
Catches any exception and converts it to a HTTP response with appropriate status code and error code-message combinations.
hashCode() - Method in class me.alidg.errors.HttpError.CodedMessage
 
HttpError - Class in me.alidg.errors
Represents the error details that should be serialized inside a HTTP response body.
HttpError(List<HttpError.CodedMessage>, HttpStatus) - Constructor for class me.alidg.errors.HttpError
Constructing a HTTP error instance.
HttpError.CodedMessage - Class in me.alidg.errors
Represents an error code paired with its appropriate error message.
HttpErrorAttributes - Class in me.alidg.errors.adapter
Custom implementation of ErrorAttributes which adapts the handled HttpError to a Spring Boot's compatible error attributes representation.
HttpErrorAttributes(WebErrorHandlers, HttpErrorAttributesAdapter) - Constructor for class me.alidg.errors.adapter.HttpErrorAttributes
Initializes the error attributes with required dependencies.
HttpErrorAttributesAdapter - Interface in me.alidg.errors.adapter
Responsible for adapting the HttpError to a Map which is compatible with the ErrorAttributes interface.
httpErrorAttributesAdapter() - Method in class me.alidg.errors.conf.ErrorsAutoConfiguration
In the absence of a bean of type HttpErrorAttributesAdapter, registers the default implementation of HttpErrorAttributesAdapter as a bean, to adapt our HttpError to Spring's ErrorAttributes abstraction.

I

INTERNAL_ERROR - Static variable in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
When something unexpected happened during security checks.
INVALID_OR_MISSING_BODY - Static variable in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
When we couldn't process the request body.

L

LastResortWebErrorHandler - Enum in me.alidg.errors.handlers
The default fallback WebErrorHandler which will be used when all other registered handlers refuse to handle a particular exception.

M

me.alidg.errors - package me.alidg.errors
 
me.alidg.errors.adapter - package me.alidg.errors.adapter
 
me.alidg.errors.annotation - package me.alidg.errors.annotation
 
me.alidg.errors.conf - package me.alidg.errors.conf
 
me.alidg.errors.handlers - package me.alidg.errors.handlers
 
me.alidg.errors.mvc - package me.alidg.errors.mvc
 
METHOD_NOT_ALLOWED - Static variable in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
The HTTP method not supported on the resource.
MISSING_COOKIE - Static variable in class me.alidg.errors.handlers.MissingRequestParametersWebErrorHandler
A required cookie is missing from the request.
MISSING_HEADER - Static variable in class me.alidg.errors.handlers.MissingRequestParametersWebErrorHandler
A required header is missing from the request.
MISSING_MATRIX_VARIABLE - Static variable in class me.alidg.errors.handlers.MissingRequestParametersWebErrorHandler
A required matrix variable is missing from the request.
MISSING_PARAMETER - Static variable in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
When a required request parameter is missing.
MISSING_PART - Static variable in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
When a required request part is missing.
missingRequestParametersWebErrorHandler() - Method in class me.alidg.errors.conf.ErrorsAutoConfiguration
Registers a WebErrorHandler to handle new Servlet exceptions defined in Spring Framework 5.1.
MissingRequestParametersWebErrorHandler - Class in me.alidg.errors.handlers
Spring Framework 5.1 added a few specific MVC exceptions for missing header, cookie, matrix variables to allow for differentiated exception handling and status codes.
MissingRequestParametersWebErrorHandler() - Constructor for class me.alidg.errors.handlers.MissingRequestParametersWebErrorHandler
 

N

NO_HANDLER - Static variable in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
When we couldn't find any controller to handle the request.
NOT_ACCEPTABLE - Static variable in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
When the Accept header is invalid.
NOT_SUPPORTED - Static variable in class me.alidg.errors.handlers.SpringMvcWebErrorHandler
When the Content-Type header is not supported.

P

postProcessEnvironment(ConfigurableEnvironment, SpringApplication) - Method in class me.alidg.errors.conf.ErrorsEnvironmentPostProcessor
Enables bean definition overriding.

R

refine(Throwable) - Method in interface me.alidg.errors.ExceptionRefiner
Performs the actual mechanics of exception transformation.

S

SpringMvcWebErrorHandler - Class in me.alidg.errors.handlers
A WebErrorHandler implementation responsible for handling common Spring MVC specific exceptions.
SpringMvcWebErrorHandler() - Constructor for class me.alidg.errors.handlers.SpringMvcWebErrorHandler
 
springSecurityWebErrorHandler() - Method in class me.alidg.errors.conf.ErrorsAutoConfiguration
Registers a WebErrorHandler bean to handle Spring Security specific exceptions when Spring Security's jar file is present on the classpath.
SpringSecurityWebErrorHandler - Class in me.alidg.errors.handlers
A WebErrorHandler implementation responsible for handling Spring Security related exceptions.
SpringSecurityWebErrorHandler() - Constructor for class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
 
SpringValidationWebErrorHandler - Class in me.alidg.errors.handlers
A WebErrorHandler responsible for handling validation errors thrown by the web layer.
SpringValidationWebErrorHandler() - Constructor for class me.alidg.errors.handlers.SpringValidationWebErrorHandler
 

T

toString() - Method in class me.alidg.errors.HttpError.CodedMessage
 
toString() - Method in class me.alidg.errors.HttpError
 

U

UNKNOWN_ERROR_CODE - Static variable in enum me.alidg.errors.handlers.LastResortWebErrorHandler
This error handler simply returns an error code representing an unknown error.
USER_DISABLED - Static variable in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
When the user is disabled.
USER_LOCKED - Static variable in class me.alidg.errors.handlers.SpringSecurityWebErrorHandler
When the user is locked.

V

validator() - Method in class me.alidg.errors.conf.ErrorsAutoConfiguration
Registers a new validator that does not interpolate messages.
valueOf(String) - Static method in enum me.alidg.errors.handlers.LastResortWebErrorHandler
Returns the enum constant of this type with the specified name.
values() - Static method in enum me.alidg.errors.handlers.LastResortWebErrorHandler
Returns an array containing the constants of this enum type, in the order they are declared.

W

WebErrorHandler - Interface in me.alidg.errors
Defines a contract to handle exceptions in the Web layer and convert them to appropriate error codes with meaningful status codes.
webErrorHandlers(MessageSource, List<WebErrorHandler>, WebErrorHandler, ExceptionRefiner) - Method in class me.alidg.errors.conf.ErrorsAutoConfiguration
Registers a bean of type WebErrorHandlers (If not provided by the user) filled with a set of built-in WebErrorHandlers, a set of custom WebErrorHandlers and a default fallback WebErrorHandler.
WebErrorHandlers - Class in me.alidg.errors
A factory over WebErrorHandler implementations.
WebErrorHandlers(MessageSource, List<WebErrorHandler>, WebErrorHandler, ExceptionRefiner) - Constructor for class me.alidg.errors.WebErrorHandlers
To initialize the WebErrorHandlers instance with a code-to-message translator, a non-empty collection of WebErrorHandler implementations and an optional fallback error handler.
A B C D E G H I L M N P R S T U V W 
Skip navigation links

Copyright © 2018. All rights reserved.