Unfortunately, we don't have error codes in the reference documents. I understand this is important and will see what we can do to get the information added.
In the case of authentication errors like invalid token or token expired, refreshing the token would be the route to go. Invalid token means we're not able to parse the token or there's something invalid in the data. Token expired means the token is expired.
Any other authentication errors fall under the third error code. In this case, it's usually something on our side that went wrong and retrying the call or refreshing the token should help.