Package com.jsgalactic.axiom.error
Class DecodeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.jsgalactic.axiom.error.AxiomException
com.jsgalactic.axiom.error.BadRequestException
com.jsgalactic.axiom.error.DecodeException
- All Implemented Interfaces:
Serializable
A request body that is missing, malformed or does not match the requested type (400). Codecs
report only a safe code and, when known, the declared property path; parser messages and input
fragments are never carried.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDecodeException(String code) Creates the exception without a field.DecodeException(String code, String field) Creates the exception for a property path. -
Method Summary
Methods inherited from class com.jsgalactic.axiom.error.AxiomException
code, headers, statusMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DecodeException
Creates the exception without a field.- Parameters:
code- safe machine-readable code, for examplemalformed_body
-
DecodeException
Creates the exception for a property path.- Parameters:
code- safe machine-readable code, for exampletype_mismatchfield- declared property path, or null when unknown- Throws:
IllegalArgumentException- if the field is not a safe property path
-
-
Method Details
-
field
Returns the property path that failed, when known.- Returns:
- property path
-
violations
Returns one violation for the field, or none.- Overrides:
violationsin classAxiomException- Returns:
- immutable violations
-