Sometimes users set the API_ENDPOINT variable to the frontend instead of the backend by accident. When they do that, they currently see an empty page when they try to log in.
This PR adds a dedicated error page when the path /oauth/spotify is accessed in the frontend. This should never happen, the corresponding request should end up at the backend instead. Displaying a detailed error page in that case should reduce user frustration and error reports resulting from this misconfiguration.
Feel free to refactor, reformat, change or even rewrite this as needed. I usually don't develop frontends, so doing it this way may be unconventional. However, I do believe that adding something like this will reduce the number of issues that are opened. For example, I believe that at least the initial post in #403 shows exactly this misconfiguration.
Sometimes users set the
API_ENDPOINT
variable to the frontend instead of the backend by accident. When they do that, they currently see an empty page when they try to log in.This PR adds a dedicated error page when the path
/oauth/spotify
is accessed in the frontend. This should never happen, the corresponding request should end up at the backend instead. Displaying a detailed error page in that case should reduce user frustration and error reports resulting from this misconfiguration.Feel free to refactor, reformat, change or even rewrite this as needed. I usually don't develop frontends, so doing it this way may be unconventional. However, I do believe that adding something like this will reduce the number of issues that are opened. For example, I believe that at least the initial post in #403 shows exactly this misconfiguration.