Discussion

Ask HN: How do you use HTTP status codes in REST APIs?

I am curious as to which philosophy you use when designing a REST API that returns JSON.

If, for example, no record is found do you return a 404 status code or a 200 with an error message?

I'm partial to using HTTP status codes and was wondering what the HN consensus was.

5 points oveja 1 year ago 5 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton