Rpj
Rpj

Reputation: 6110

What status should be set used for returning validation errors on an entity in HttpStatus

What status should be set used for returning validation errors on an entity from org.springframework.http.HttpStatus

If we want to return validation errors if certain fields are empty, what status would be preferable to use

Upvotes: 0

Views: 26

Answers (1)

Niranjan M
Niranjan M

Reputation: 36

400 - Bad Request is the common response code sent if the request doesn't contain all the required parameters or if it is in a invalid format. More on this: 400 BAD request HTTP error code meaning?

Upvotes: 1

Related Questions