App Engine : 400 - Your client has issued a malformed or illegal request Asked 14 years, 11 months ago Modified 5 days ago Viewed 79k times App Engine : 400 - Your client has issued a malformed or illegal request Asked 14 years, 11 months ago Modified 5 days ago Viewed 79k times I'm using Spring MVC for a simple JSON API, with a @ResponseBody based approach like the following. (I already have a service layer producing JSON directly.) @RequestMapping(value = "/matches/{ A 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules (which is true in this example because POST was not defined). A 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules (which is true in this example because POST was not defined). You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. What's reputation and how do I get it? Instead, you can save this post to reference later. I'm using Spring MVC for a simple JSON API, with a @ResponseBody based approach like the following. (I already have a service layer producing JSON directly.) @RequestMapping(value = "/matches/{ steps.oauth.v2.invalid_request 400 This error name is used for multiple different kinds of errors, typically for missing or incorrect parameters sent in the request. steps.oauth.v2.invalid_request 400 This error name is used for multiple different kinds of errors, typically for missing or incorrect parameters sent in the request. Later, when the size of cookies reaches 1MB, the browser shows the 400 error (the size of the request headers is too long). In this case, it is better to clear the unnecessary data from the local storage after using them. What the difference between the 400 and 404 HTTP errors? Can you show me an example for understand the difference? Thank you. Situations of 400 over 422: Remember, the response code 422 is an extended HTTP (WebDAV) status code. There are still some HTTP clients / front-end libraries that aren't prepared to handle 422. For them, its as simple as "HTTP 422 is wrong, because it's not HTTP". From the service perspective, 400 isn't quite specific. Later, when the size of cookies reaches 1MB, the browser shows the 400 error (the size of the request headers is too long). In this case, it is better to clear the unnecessary data from the local storage after using them. What the difference between the 400 and 404 HTTP errors? Can you show me an example for understand the difference? Thank you. A 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules. In the case of a REST API with a JSON payload, 400's are typically, and correctly I would say, used to indicate that the JSON is invalid in some way according to the API specification for the service. By that logic, both the scenarios you provided should be 400s A 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules. In the case of a REST API with a JSON payload, 400's are typically, and correctly I would say, used to indicate that the JSON is invalid in some way according to the API specification for the service. By that logic, both the scenarios you provided should be 400s the endpoint returns 400 Bad Request, which causes PowerShell to show the following not-so-helpful message: Invoke-WebRequest : The remote server returned an error: (400) Bad Request. Situations of 400 over 422: Remember, the response code 422 is an extended HTTP (WebDAV) status code. There are still some HTTP clients / front-end libraries that aren't prepared to handle 422. For them, its as simple as "HTTP 422 is wrong, because it's not HTTP". From the service perspective, 400 isn't quite specific. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. What's reputation and how do I get it? Instead, you can save this post to reference later. the endpoint returns 400 Bad Request, which causes PowerShell to show the following not-so-helpful message: Invoke-WebRequest : The remote server returned an error: (400) Bad Request.
Articles and news, personal stories, interviews with experts.
Photos from events, contest for the best costume, videos from master classes.
![]() | ![]() |
![]() | ![]() |
![]() | ![]() |
![]() | ![]() |
![]() | ![]() |
![]() | ![]() |