What is the HTTP status code for validation error?
In most cases Eloqua’s APIs will respond to requests with the standard HTTP status code definitions. If the API fails to validate a request, it will respond with a validation error message (JSON or XML) describing the issue. 400: “There was a parsing error.”
What is status code 200 OK?
The HTTP 200 OK success status response code indicates that the request has succeeded. The meaning of a success depends on the HTTP request method: GET : The resource has been fetched and is transmitted in the message body. HEAD : The representation headers are included in the response without any message body.
What’s the best HTTP status code for failed validation?
A duplicate in the database should be a 409 CONFLICT. I recommend using 422 UNPROCESSABLE ENTITY for validation errors. I give a longer explanation of 4xx codes here. Ugh… (309, 400, 403, 409, 415, 422)… a lot of answers trying to guess, argue and standardize what is the best return code for a successful HTTP request but a failed REST call.
Is it wrong to mix HTTP status code and rest status code?
Ugh… (309, 400, 403, 409, 415, 422)… a lot of answers trying to guess, argue and standardize what is the best return code for a successful HTTP request but a failed REST call. It is wrong to mix HTTP status codes and REST status codes. However, I saw many implementations mixing them, and many developers may not agree with me.
Is it possible to receive an empty web-page with 200 status code?
If the HTTP request physically was performed successfully it should always return 200 code, regardless is the record (s) found or not. Because URI resource is found and was handled by the HTTP server. Yes, it may return an empty set. Is it possible to receive an empty web-page with 200 as HTTP result, right?
What does status code for upstream service failure mean?
Especially the last one, since it has the connotation of being unavailable due to load or too many requests to process. You shouldn’t look at it from your (the api providers) perspective, but rather from the consumers perspective. You should be able to explain to your consumers how they should act when receiving a specific status code.