Add dedicated frontend error page when API_ENDPOINT points to the frontend #404
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.