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

better error message when failing to load gist #3

Open
jkulton opened this issue Jan 28, 2022 · 0 comments
Open

better error message when failing to load gist #3

jkulton opened this issue Jan 28, 2022 · 0 comments

Comments

@jkulton
Copy link
Owner

jkulton commented Jan 28, 2022

Right now when the gist fails to load from GitHub's API we just show the generalized "Unsupported gist" error.

Instead, we could check the status code of the response.

  • If the response was a 200 and the gist has a markdown file, render the gist
  • If the response was a 200 and the gist doesn't have a markdown file, render the unsupported gist error
  • If the response is a non-200 maybe just render the message property from the API error directly (our users are likely developers, so maybe they would find the error message insightful)

Screen Shot 2022-01-27 at 8 35 16 PM

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

No branches or pull requests

1 participant