Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save loinguyenduc101/b79a8fefb329cd82a7209d0b7bee37b2 to your computer and use it in GitHub Desktop.
Save loinguyenduc101/b79a8fefb329cd82a7209d0b7bee37b2 to your computer and use it in GitHub Desktop.
spring-bad request response json
{
"timestamp": 1491753977762,
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.web.bind.MethodArgumentNotValidException",
"errors": [
{
"codes": [
"NotBlank.loginRequest.password",
"NotBlank.password",
"NotBlank.java.lang.String",
"NotBlank"
],
"arguments": [
{
"codes": [
"loginRequest.password",
"password"
],
"arguments": null,
"defaultMessage": "password",
"code": "password"
}
],
"defaultMessage": "may not be empty",
"objectName": "loginRequest",
"field": "password",
"rejectedValue": null,
"bindingFailure": false,
"code": "NotBlank"
},
{
"codes": [
"NotBlank.loginRequest.username",
"NotBlank.username",
"NotBlank.java.lang.String",
"NotBlank"
],
"arguments": [
{
"codes": [
"loginRequest.username",
"username"
],
"arguments": null,
"defaultMessage": "username",
"code": "username"
}
],
"defaultMessage": "may not be empty",
"objectName": "loginRequest",
"field": "username",
"rejectedValue": null,
"bindingFailure": false,
"code": "NotBlank"
}
],
"message": "Validation failed for object='loginRequest'. Error count: 2",
"path": "/gsmwpush/login"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment