Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The worst ones to work with were the ones returning errors in 200.

I've had similar experiences.

Status codes are logical, machine-oriented things. At the very least, 4xx should denote client errors (that implicitly should not be retried without change) 5xx should denote server errors (where it could make sense for the client to retry).

I've integrated with APIs where 2xx can denote an error, so clients had to parse the body or headers of the response to determine the real status some other 'inventive' way. Please, don't do this.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: