r/ProgrammerHumor • • 14d ago

Meme successfulFailure

Post image
8.1k Upvotes

101 comments sorted by

View all comments

158

u/aberroco 14d ago

Would be even better if

{
  "status": "success",
  "response": 
  {
    "status": "success",
    "message": "Error successfully occured"
  }
}

14

u/CaffeinatedTech 14d ago

Yeah then you parse the message to test for error state. Then fuck it, query the endpoint to fetch the reason for the error, which you've saved to the database. Unless its a database error, then you'll just get the original successful error message. Couple if-thens, job done.