Class BadRequestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
se.idsec.signservice.integration.core.error.SignServiceIntegrationException
se.idsec.signservice.integration.core.error.SignServiceIntegrationCategoryException
se.idsec.signservice.integration.core.error.BadRequestException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InputValidationException,PolicyNotFoundException
Class that represents a bad request to the SignService Integration Service.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ErrorCode.CategoryThe identifier for a bad request category. -
Constructor Summary
ConstructorsConstructorDescriptionBadRequestException(ErrorCode.Code code, String message) Constructor.BadRequestException(ErrorCode.Code code, String message, Throwable cause) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final ErrorCode.CategoryReturnsBAD_REQUEST_ERROR_CATEGORY.intIf the SignService Integration Service is used from a REST API, the HTTP status may be useful when reporting errors.Methods inherited from class se.idsec.signservice.integration.core.error.SignServiceIntegrationException
getErrorCodeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
BAD_REQUEST_ERROR_CATEGORY
The identifier for a bad request category.
-
-
Constructor Details
-
BadRequestException
Constructor.- Parameters:
code- the error code (within theBAD_REQUEST_ERROR_CATEGORYcategory)message- the error message
-
BadRequestException
Constructor.- Parameters:
code- the error code (within theBAD_REQUEST_ERROR_CATEGORYcategory)message- the error messagecause- the cause of the error
-
-
Method Details
-
getHttpStatus
public int getHttpStatus()If the SignService Integration Service is used from a REST API, the HTTP status may be useful when reporting errors.- Specified by:
getHttpStatusin classSignServiceIntegrationException- Returns:
- the HTTP status code that should be used when sending an error response for this exception
-
getCategory
ReturnsBAD_REQUEST_ERROR_CATEGORY.- Overrides:
getCategoryin classSignServiceIntegrationException- Returns:
- the error category for this exception
-