Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dedicated frontend error page when API_ENDPOINT points to the frontend #404

Merged
merged 2 commits into from
May 30, 2024

Conversation

RagingCactus
Copy link
Contributor

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.

grafik

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.

This is done to re-use code for other errors later on.
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 commit 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.
@Yooooomi
Copy link
Owner

Many thanks man

@Yooooomi Yooooomi changed the base branch from master to release/1.11.0 May 30, 2024 20:26
@Yooooomi Yooooomi merged commit 17b24b4 into Yooooomi:release/1.11.0 May 30, 2024
@RagingCactus RagingCactus deleted the frontend-error-pages branch May 30, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants