Class ValidationResponse
java.lang.Object
com.broadleafcommerce.dataexchange.service.error.validation.ValidationResponse
Represents a validation error from a Broadleaf service. This is equal to the request body of a
400 response from a Broadleaf service. A 400 response with a validation error typically looks
something like this:
// @formatter:off
{@code
{
"type": "VALIDATION",
"title": "Validation Error",
"timestamp": "2025-01-28T15:52:38.624270627Z",
"status": "BAD_REQUEST",
"statusCode": 400,
"fieldErrors": {
"name": [
{
"code": "nameUnique",
"reason": "Names must be unique",
"path": "name",
"rejectedValue": "my name"
}
],
"uri": [
{
"code": "uriUnique",
"reason": "URIs must be unique",
"path": "uri",
"rejectedValue": "/my-uri"
}
]
}
}
// @formatter:on
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getTitle()
getType()
int
hashCode()
void
setFieldErrors
(Map<String, Object> fieldErrors) void
void
setStatusCode
(Integer statusCode) void
setTimestamp
(Instant timestamp) void
void
toString()
-
Constructor Details
-
ValidationResponse
public ValidationResponse()
-
-
Method Details