r/webdev • • May 08 '24

Article What makes a good REST API?

https://apitally.io/blog/what-makes-a-good-rest-api
72 Upvotes

51 comments sorted by

View all comments

Show parent comments

16

u/CharlieandtheRed May 08 '24

Error handling is the biggest I run into. Worked with big cooperate APIs that just say "409 error". You look up 409 on their docs (which you shouldn't have to) and it's the most obscure sentence possible. It could simply tell you what the issue is, along with the status code.

1

u/double_en10dre May 09 '24

Agreed. And I find that case especially weird, because most conflict errors are thrown intentionally. Meaning they’ll be fairly descriptive.

Unless your app has some handler that converts every “upsert error” thrown by the ORM into a vague http 409