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 handling and styles in generate srcbook modal #147

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

benjreinhart
Copy link
Contributor

  • If generation fails, we show an error message. This PR makes it so that error message is dismissed the next time the user clicks "generate" or "try again"
  • Add correct styles for API key warnings
  • Add correct styles for errors
  • Special case handling of invalid API key error (ran into this locally)
  • Add "try again" link to error message. I'm a bit torn on this since I expect most cases probably won't succeed when trying again, but added it anyways.

When user never set api key

Screenshot 2024-07-19 at 3 49 08 PM

When user set api key but the key is invalid according to openai

Screenshot 2024-07-19 at 3 48 47 PM

Generic error

Screenshot 2024-07-19 at 3 49 27 PM

@benjreinhart benjreinhart requested a review from nichochar July 19, 2024 22:50
@benjreinhart benjreinhart merged commit 2ba0dbb into main Jul 19, 2024
1 check passed
@benjreinhart benjreinhart deleted the ai-fixes branch July 19, 2024 22:54
@nichochar
Copy link
Contributor

Very nice!

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