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 error handling/good fallbacks for Resource data #146

Open
brookslybrand opened this issue Dec 15, 2023 · 1 comment
Open

Add error handling/good fallbacks for Resource data #146

brookslybrand opened this issue Dec 15, 2023 · 1 comment

Comments

@brookslybrand
Copy link
Contributor

Either add error messages/clear defaults when certain data doesn't load, or improve the error message shown. These are all the data fetching that needs to be handled:

  • resources.yaml -- Can probably default to the main error page if this fails
  • fetchReadme/getResourceReadme -- Individual resource page, show a message that the readme can't be loaded properly with a link to the repo
  • image fails to fetch -- better fallback than a broken image
  • getSponsorUrl -- Maybe just don't show the sponsor button if this one fails? I think this one actually works this way already
  • fetchResourceGitHubData/getResourceGitHubData -- Maybe some good fallbacks, such as "failed to load description". I think this is better than the whole thing blowing up
@AlemTuzlak
Copy link
Contributor

@brookslybrand for the broken images we could use the regex to possibly add an onerror attribute to link to a 404 image in the repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants