Sobes.tech
Junior — Middle

What is meant by response code 400 in web responses, and in what situations is it used?

sobes.tech AI

Answer from AI

HTTP 400 (Bad Request) indicates that the server cannot process the request due to a client error. This can be caused by:

  • Incorrect request syntax
  • Invalid parameters
  • Missing required data

For example, if the client sends JSON with an invalid format or omits a required field, the server may return 400 to indicate a request error. This helps the client understand what needs to be fixed before resubmitting.