Class ApiErrorModel
java.lang.Object
net.ygbstudio.jbrave.core.domain.dto.error.ApiErrorModel
Error model object that Brave Search API uses to communicate with the user and provide
remediation steps. It deserialises the error code to a native enum constant to facilitate error
handling strategies with switch statements.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionApiErrorModel(@NotNull ApiErrorModel.Builder builder) Creates a new error model from the given builder. -
Method Summary
-
Constructor Details
-
ApiErrorModel
Creates a new error model from the given builder.- Parameters:
builder- the builder carrying the error fields
-
-
Method Details
-
id
Returns the error identifier.- Returns:
- the error identifier
-
code
Returns the error code.- Returns:
- the error code
-
detail
Returns the error detail message.- Returns:
- the detail message
-
status
Returns the HTTP status code associated with the error.- Returns:
- the status code
-
meta
Returns additional error metadata.- Returns:
- the error metadata
-
equals
-
hashCode
public int hashCode() -
toString
-