liveBook · Manning

400 bad request

HTTP 400 Bad Request is a client-error status code indicating that a server cannot or will not process a request because of a client-side error.

How 2 Manning books explain it

ASP.NET Core in Action, 3e

A 400 status code is an HTTP response status indicating that the server could not process the request because of invalid client input.

How it is used
Signals invalid client input in an HTTP API, including validation failures and binding or parsing errors.
How deep it goes
Explains explicit results and automatic binding failures, but stops short of defining a complete validation-error format.
Examples
Uses duplicate fruit identifiers, incompatible integer input, and failed ProductId parsing to demonstrate 400 responses.
What you can do after
Diagnose invalid route, query, header, or body input and return a deliberate 400 response from a minimal API endpoint.

Read how ASP.NET Core in Action, 3e explains 400 bad request →

The Design of Web APIs, Second Edition

HTTP 400 Bad Request is an HTTP client-error status indicating that the server cannot process the request because its syntax or supplied data is invalid.

How it is used
Marks missing or invalid query and body inputs as consumer errors during HTTP operation design.
How deep it goes
Works through status-selection checks and corrective messages, while deferring additional error cases involving security and planned interruptions.
Examples
Uses product search filters, product updates, malformed JSON, and money transfers with missing accounts or unsupported currencies.
What you can do after
Practice/perform an input-error review and write 400 responses that tell consumers how to repair requests.

Read how The Design of Web APIs, Second Edition explains 400 bad request →

Also covered in

What to know first

Related concepts

Questions about 400 bad request

What is 400 bad request?

HTTP 400 Bad Request is a client-error status code indicating that a server cannot or will not process a request because of a client-side error.

Which Manning books explain 400 bad request?

ASP.NET Core in Action, 3e and The Design of Web APIs, Second Edition.

What should I know before learning 400 bad request?

Manning books that teach 400 bad request usually introduce HTTP GET, JSON, HTTP request and model binding first.

What is the difference between 400 bad request and 422 unprocessable entity?

HTTP 400 Bad Request is a client-error status code indicating that a server cannot or will not process a request because of a client-side error. 422 Unprocessable Entity is an HTTP client-error status code indicating that a syntactically valid request cannot be processed because its content is semantically invalid.

What is 400 bad request a kind of?

400 bad request is a kind of HTTP status code. An HTTP status code is a standardized three-digit code in an HTTP response that indicates the outcome of processing a request.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.