DEV Community

Discussion on: 404 status code! Really?

Collapse
 
simonlegg profile image
Simon

AHHHH I’ve flipped my opinion on this so many times just on this page!! I have no idea, I think either is ok as long as an API is consistent it’d be annoying if one endpoint returned a 404 if the record didn’t exist and another endpoint in the same API returned a 200 with null data.

I think as long as they’re consistent either is totally fine. I think. Or do I?! I just don’t know anymore 🤯