http-status-codes Questions
1
Solved
A lot of resources say, that GraphQL should always respond with a 200 status code, even when an error occurred:
https://www.graph.cool/docs/faq/api-eep0ugh1wa/#how-does-error-handling-work-with-g...
Tartlet asked 14/1, 2020 at 8:5
1
Solved
In back end I have a logic that authenticated users reset their password. I take the old password and a new one as parameters. If the old password doesn't match, then they will get an error, but I ...
Insulin asked 25/12, 2019 at 11:44
1
Solved
What would be the appropriate status code to use for a server telling a user who is signing up using the site's REST API that their password did not meet the specified requirements (such as length)...
Selie asked 22/12, 2019 at 0:36
4
Solved
I am creating a REST API and find it difficult to choose the right HTTP status code to return in some cases.
Let's say I expect a certain value, and when it is not present I cannot perform a certa...
Yardmaster asked 22/9, 2016 at 10:38
2
What is the correct http response code to send if server times out to process a request? [duplicate]
I have a long running servlet, and I want to abort the process if timeout occurs. (Well long running servlet is another discussion).
Now when I abort the request at server, then shall I send...
Susuable asked 15/11, 2019 at 11:20
5
Solved
I have a service where some validation rules must be checked before a particular operation should be able to take place.
For instance, the client should not generate printable reports if all of th...
Passage asked 29/6, 2012 at 7:4
3
Solved
According to the urllib2 documentation,
Because the default handlers handle redirects (codes in the 300 range), and codes in the 100-299 range indicate success, you will usually only see error ...
Amino asked 11/8, 2011 at 21:11
2
Solved
A POST to a specific end point allows to upload an image except if the image is too large, so I want to return the appropiate http status code response in that case.
A http status code 400 respons...
Thirteen asked 15/1, 2016 at 11:56
2
Solved
I am trying to force ValidationError to return a different status code than 400. This is what I did:
class MyValidationError(ValidationError):
status_code = HTTP_403_FORBIDDEN
and then in a ser...
Embitter asked 27/7, 2018 at 22:4
3
Solved
I recently joined a new project. In this project, all APIs in service always return status code 200. Even, if that response was should be 400 or 404, the API returns status code 200.
I asked the ...
Prothrombin asked 24/6, 2019 at 12:37
6
Solved
I'm upgrading our REST API endpoints and I want to notify clients when they are calling the to-be-deprecated endpoint.
What header should I use in the response with a message along the lines of "Th...
Forsberg asked 14/12, 2012 at 18:14
1
Solved
I have a single PUT endpoint which creates/replace an entity and don't need to return a Location header or any entity body.
Does it makes sense to always return 204 (No Content) or should it be 20...
Embryogeny asked 13/3, 2019 at 21:46
2
I'm trying to create a login form. when I'm testing the service with Postman, I will get a body object with status code and etc.
But, with JavaScript fetch, I can't get body object and I j...
Babirusa asked 27/2, 2019 at 8:24
11
Solved
In a webpage, it uses YUI connection manager/datasource to send AJAX requests to the server, if the session (which contains the info on whether the user has been authenticated) has already timed ou...
Astronavigation asked 31/10, 2009 at 5:19
3
Solved
I have a Angular 6 client consuming a REST Api developed with .Net Web Api.
Everything is working except for the error handling. When I try to process the error to react differently to different s...
Leroylerwick asked 31/1, 2019 at 15:26
3
Solved
After lots of Googling and Stackoverflowing, it still isn't clear to me because many articles and questions/answers were too general (including 403 Forbidden vs 401 Unauthorized HTTP response...
Splat asked 2/5, 2018 at 21:3
2
Solved
I'm working on a project where I'm building the frontend and someone else is building an API. I was proposing the following structure for all requests, sent as JSON:
{
"success": true, // true/fa...
Dyer asked 2/7, 2014 at 17:12
3
Solved
Just wondering if an enum can be null in C#?
Specifically I'm interested in the HttpStatusCode implementation of enum in C#.
What will happen if I will not assign a value to a variable of the Htt...
Joselynjoseph asked 8/1, 2019 at 10:7
5
Solved
I have a page with a lot of images that are generated server-side depending on user actions. And when image loads successfully I'm happy, but when there is an error on the server I have to act acco...
Rett asked 13/11, 2011 at 0:23
4
Solved
I have a set of resources whose representations are lazily created. The computation to construct these representations can take anywhere from a few milliseconds to a few hours, depending on server ...
Fausta asked 4/11, 2010 at 18:20
7
Solved
What is the appropriate HTTP status code response for a general unsuccessful request (not an error)?
I'm creating a RESTful API that will process a number of user interactions, including placing orders using stored credit cards.
In the case of a successful order, I'm returning a 200 OK, and in th...
Cloche asked 21/2, 2012 at 16:46
1
Solved
We have a route in our API which (when called) hits another 3rd party API.
e.g.
HTTP-GET /account/1
this returns some data from our database AND from .. say .. a 3rd party api like Auth0/Okta/Sa...
Douce asked 29/9, 2018 at 8:4
3
Solved
Let say we have only 30 products and a REST API with QueryString parameters used for pagination. In the exemple below pagesize is the number of resources per page.
api/products?page=1pagesize=10
...
Dreyfus asked 8/9, 2014 at 12:52
1
Solved
I've read a lot of posts and articles regarding proper http status code to return for client request error.
Others suggest to use 400 as it has been redefined in RFC 7231 though I'm not sure if the...
Heda asked 23/8, 2018 at 16:14
2
Solved
New to Guzzle/Http.
I have a API rest url login that answer with 401 code if not authorized, or 400 if missing values.
I would get the http status code to check if there is some issues, but canno...
Squeamish asked 2/5, 2018 at 12:53
© 2022 - 2024 — McMap. All rights reserved.