19

Just found this HTTP response.

Status Code:
200 - OK

Body:

{
status: "success",
response:
{
status: "error",
}
}

Comments
  • 3
    Slack API?
  • 7
    Mission failed successfully 👍
  • 2
  • 12
    I 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.
  • 11
    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.
  • 5
    *frontend developer screeching noises*
  • 2
    "It's a http response monad" 😆
  • 4
    This 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.
  • 2
    @useVim what is it, the universe's simulation source code or something?
  • 1
    Literally every ducking day, I see API responses like this.
    Even the azure openai API does this
  • 1
    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"
  • 0
    @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.
  • 0
    @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.
Add Comment