Handles oauth2 errors manually