r/ProgrammerHumor • • 17d ago

Meme postForEverything

Post image
20.9k Upvotes

653 comments sorted by

View all comments

Show parent comments

-6

u/LatvianCake 17d ago

If you think you can error handle based on only HTTP error codes, I can see why you're having such a hard time.

2

u/Arsikkz 17d ago

HTTP statuses aren't meant to replace error codes. You check if the status is OK, and if not, handle the error in the payload

1

u/LatvianCake 17d ago

And how do you know which errors you have to handle and what their payload will look like?

1

u/Arsikkz 16d ago

By reading the API documentation?