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.Category
The 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.Category
ReturnsBAD_REQUEST_ERROR_CATEGORY
.int
If 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
getErrorCode
Methods 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_CATEGORY
category)message
- the error message
-
BadRequestException
Constructor.- Parameters:
code
- the error code (within theBAD_REQUEST_ERROR_CATEGORY
category)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:
getHttpStatus
in classSignServiceIntegrationException
- Returns:
- the HTTP status code that should be used when sending an error response for this exception
-
getCategory
ReturnsBAD_REQUEST_ERROR_CATEGORY
.- Overrides:
getCategory
in classSignServiceIntegrationException
- Returns:
- the error category for this exception
-