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 for alt text API #330

Merged
merged 5 commits into from
Apr 1, 2024
Merged

Conversation

NateLanza
Copy link
Contributor

Does this PR close any open issues?

Closes #324

Give a longer description of what this PR addresses and why it's needed

This PR adds error handling for aggregated plots which we can't generate alttxts for. Previously, Upset would silently refuse to update an alttxt for an aggregated plot without informing the user. Now, an error message is displayed when attempting to generate an alttxt for an aggregated plot. Additionally, more error handling was added for errors from the alttxt API; appropriate error messages are displayed if the API fails with a 400 code, 500 code, or other code. Finally, a test was added to Playwright to ensure that the error message displays for aggregated alttxt generation.

Provide pictures/videos of the behavior before and after these changes (optional)

Before:
Screenshot 2024-03-28 at 10 01 53 PM
After:
Screenshot 2024-03-28 at 10 02 21 PM

Have you added or updated relevant tests?

  • Yes
  • No changes are needed

Have you added or updated relevant documentation?

  • Yes
  • No changes are needed

Are there any additional TODOs before this PR is ready to go?

TODOs:

  • ...

@NateLanza NateLanza requested a review from JakeWags March 29, 2024 04:07
@NateLanza NateLanza self-assigned this Mar 29, 2024
Copy link

netlify bot commented Mar 29, 2024

Deploy Preview for upset2 ready!

Name Link
🔨 Latest commit 44c87b8
🔍 Latest deploy log https://app.netlify.com/sites/upset2/deploys/660b2f5c4d7ebb0008c2bfe3
😎 Deploy Preview https://deploy-preview-330--upset2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@NateLanza NateLanza changed the title Isu324 alttxt err handl Add error handling for alt text API Mar 29, 2024
Copy link
Member

@JakeWags JakeWags left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! No changes needed 👍

@NateLanza NateLanza merged commit 6d06f8f into main Apr 1, 2024
7 checks passed
@NateLanza NateLanza deleted the isu324-alttxt-err-handl branch April 1, 2024 22:12
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.

Alttxt error handling
2 participants