What I am searching for is a generic way to handle API error codes. For example:
error.status.code
401
(in this ca