Improve handling error response from token request