Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ltlian21961yI once got in touch with the maintainers of an API that did this, and their response was essentially "Rest is useless because nobody follows it". It's sort of poetic.
-
i can actually imagine a use case where this is a legit and clean response: checking the status of a long-running task. your check went through successfully, but the task failed.
but i am 100% sure that this will never be the case in real life... i've seen too much to keep up such high hopes. -
Voxera115851yThis is quite common unfortunately.
We have the same in the old api’s but we are slowly replacing them with new endpoints that use more correct http status codes. -
j0n4s54351yLiterally every ducking day, I see API responses like this.
Even the azure openai API does this -
Oh I love these APIs
The response I got from the designer "the first Success tells you the response was successful and the second one says the status of the transaction" -
hjk10157311y@tosensei tell have been telling this every time with examples of jobs like in rundeck.
The actual action: requesting details of the job is successful. However if the job failed it should state that in the payload but not pretend that the GET request failed. -
Voxera115851y@tosensei even in that cade you can use different http status codes to indicate what type of problem it is where one indicates a problem with the check code another communication problem and a third that the job have failed. Or maybe multiple for each for better granularity.
A 200 means that all parts are OK.
Just found this HTTP response.
Status Code:
200 - OK
Body:
{
status: "success",
response:
{
status: "error",
}
}
rant