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

TagsComponent: improve token refresh and error catching #2786

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

MonkeyDo
Copy link
Contributor

@mayhem recently reported and helped me debug an issue he's been seeing that is breaking the Listening Now page.
It is to do with tags fetching and how I handled refreshing the MB token and retrying.

This PR improves a couple of things:

  1. Wrap the tags fetch+retry in a try…catch block, that should prevent the broken page we were seeing
  2. Return the token from the freshMBToken method so we can use it in the retry function; it seemed like the new token from the global context was not being used, not sure why
  3. Show an error to the user if we can't get their tags for some reason. Some feedback is nice.

@mayhem
Copy link
Member

mayhem commented Feb 15, 2024

Thank you for fixing it!

@MonkeyDo MonkeyDo merged commit 1a04a63 into master Feb 23, 2024
5 checks passed
@MonkeyDo MonkeyDo deleted the tags-auth-retry branch February 23, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants