It looks like we rename these underlying http status codes when in gets packaged as a class. See here
This is very confusing.
HTTP 401 is canonically Unauthorized.
HTTP 403 is canonically Forbidden.
There is no "unauthenticated" status code.
This rename means users reaching for an Unauthorized http status (401) will inadvertently return a 403. Users looking for a Forbidden http status will be confused and have to dig.
We should be able to simply add a ForbiddenException to handle the 403 case. Then we can deprecate the older UnauthorizedException.
We can also introduce UnauthorizedExceptionV2 and deprecate the UnauthenticatedException.
It looks like we rename these underlying http status codes when in gets packaged as a class. See here
This is very confusing.
HTTP 401 is canonically
Unauthorized.HTTP 403 is canonically
Forbidden.There is no "unauthenticated" status code.
This rename means users reaching for an
Unauthorizedhttp status (401) will inadvertently return a 403. Users looking for aForbiddenhttp status will be confused and have to dig.We should be able to simply add a
ForbiddenExceptionto handle the 403 case. Then we can deprecate the olderUnauthorizedException.We can also introduce
UnauthorizedExceptionV2and deprecate theUnauthenticatedException.