News for hackers. Stuff that matters.
Re:Best practices for REST API design (2020) by Mordisquitos on Monday February 22, 2021 @11:34AM (#26226456)
Small typo-ish error in the article, emphasis mine:

> 401 Unauthorized – This means the user isn’t not authorized to access a resource.

Surely that should say that the user isn't not unauthorised?

Re:Best practices for REST API design (2020) by s_dev on Monday February 22, 2021 @11:36AM (#26226478)
No, just "isn't authorised" is clear. The triple negative is a bit much.
Re:Best practices for REST API design (2020) by throwoutttt on Monday February 22, 2021 @11:39AM (#26226520)
403 is unauthorized (forbidden due to authorization policy).

401 is unauthenticated (not logged in).

Very important difference for clients handling authentication state.

Re:Best practices for REST API design (2020) by Mordisquitos on Monday February 22, 2021 @12:00PM (#26226833)
That is not false, I didn't not fail to notice that after fixating on the incorrect double negative! However, not to be unfair, 401 is unfortunately not named "unauthenticated", even though it's conventional usage (as you point out) is not unintended to actually mean lack of authentication rather than of authorisation.