When using the Spotify Web API for authentication, testing locally or on Heroku, my app is getting the following errors. It works about half the time. I believe it is something going wrong on Spotify's end.
InternalOAuthError: failed to fetch user profile (status: 502 data: { "error": { "status": 502, "message": "Bad gateway." } }).
If I refresh the page we get this error message
TokenError at Strategy.OAuth2Strategy.parseErrorResponse
We are using node modules to do the authentication. Using passport-spotify passport-oauth2. It doesn't appear to be an error on our side. Any idea what this could be?