Error Http Status Code 200
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn
Http Status Code 200 Received But Error During Response Parsing
more about Stack Overflow the company Business Learn more about hiring developers or transport error http status code was not 200 posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community http status code 200 vs 201 Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Returning http 200 OK with error within response body up
Http Status Code 200 Meaning
vote 3 down vote favorite 3 I'm wondering if it is correct to return HTTP 200 OK when error on server side occurred with some error inside of response body. Example: We're sending http GET Something unexpected happened on the server side. Server returns http 200 OK status code with error inside a response (e.g. {"status":"some error occured"} Is is correct behavior or not? Shouldn't we change status
Http Status Code For Validation Error
code? http http-status-code-400 http-status-code-200 share|improve this question edited Jan 14 '15 at 10:01 CodeCaster 76.5k982135 asked Jan 13 '15 at 11:53 krzakov 3053923 1 HTTP 200 means transmission is OK on the http level. This has nothing to do with success or failure of your "business code". In this case the HTTP 200 indicates that your "business code error message" was succesfully transferred ;-) Alternatively you could let your server respond with HTTP 500 meaning "internal error". This is more typical for technical or unrecoverable problems on the server. –geert3 Jan 13 '15 at 11:57 Can anybody confirm that? I talked with some programmers and I can hear different opinions. –krzakov Jan 13 '15 at 12:01 add a comment| 3 Answers 3 active oldest votes up vote 11 down vote No, this is very incorrect. HTTP is an application protocol. 200 implies that the response contains a payload that represents the status of the requested resource. An error message usually is not a representation of that resource. If something goes wrong while processing GET, the right status code is 4xx ("you messed up") or 5xx ("I messed up"). share|improve this answer answered Jan 13 '15 at 13:05 Julian R
referer DNT X-Forwarded-For Status codes 301 Moved Permanently 302 Found 303 See Other 403 Forbidden 404 Not Found 451 Unavailable For Legal Reasons v t e This is a list of Hypertext Transfer Protocol (HTTP) response status codes. status code 200 from cache It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional
Status Code 200 Ok From Cache
commonly used codes. The first digit of the status code specifies one of five classes of response; an HTTP client must status code 200 xbox recognise these five classes at a minimum. The phrases used are the standard wordings, but any human-readable alternative can be provided. Unless otherwise stated, the status code is part of the HTTP/1.1 standard (RFC 7231).[1] The http://stackoverflow.com/questions/27921537/returning-http-200-ok-with-error-within-response-body Internet Assigned Numbers Authority (IANA) maintains the official registry of HTTP status codes.[2] Microsoft IIS sometimes uses additional decimal sub-codes to provide more specific information,[3] but not all of those are here (note that these sub-codes only appear in the response payload and in documentation; not in the place of an actual HTTP status code). Contents 1 1xx Informational 2 2xx Success 3 3xx Redirection 4 4xx Client Error 5 5xx Server Error https://en.wikipedia.org/wiki/List_of_HTTP_status_codes 6 Unofficial codes 6.1 Internet Information Services 6.2 nginx 6.3 CloudFlare 7 See also 8 Notes 9 References 10 External links 1xx Informational[edit] Request received, continuing process. This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. Since HTTP/1.0 did not define any 1xx status codes, servers must not[note 1] send a 1xx response to an HTTP/1.0 client except under experimental conditions.[4] 100 Continue The server has received the request headers and the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient. To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.[2] 101 Switching Protocols The requester has asked the server to switch protocols and the server has agreed to do so.[5] 102 Processing (WebDAV; RFC 2518) A WebDAV request may contain many sub-requests involving file ope
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/27921537/returning-http-200-ok-with-error-within-response-body workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join status code them; it only takes a minute: Sign up Returning http 200 OK with error within response body up vote 3 down vote favorite 3 I'm wondering if it is correct to return HTTP 200 OK when error on server side occurred with some error inside of response body. Example: We're sending http GET Something unexpected happened on the server status code 200 side. Server returns http 200 OK status code with error inside a response (e.g. {"status":"some error occured"} Is is correct behavior or not? Shouldn't we change status code? http http-status-code-400 http-status-code-200 share|improve this question edited Jan 14 '15 at 10:01 CodeCaster 76.5k982135 asked Jan 13 '15 at 11:53 krzakov 3053923 1 HTTP 200 means transmission is OK on the http level. This has nothing to do with success or failure of your "business code". In this case the HTTP 200 indicates that your "business code error message" was succesfully transferred ;-) Alternatively you could let your server respond with HTTP 500 meaning "internal error". This is more typical for technical or unrecoverable problems on the server. –geert3 Jan 13 '15 at 11:57 Can anybody confirm that? I talked with some programmers and I can hear different opinions. –krzakov Jan 13 '15 at 12:01 add a comment| 3 Answers 3 active oldest votes up vote 11 down vote No, this is very incorrect. HTTP is an application protocol. 200 implies that the response contain