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

Correctly set types of ApiFailedChecks members as optional #2544

Merged
merged 1 commit into from
Jun 5, 2022

Conversation

eemeli
Copy link
Member

@eemeli eemeli commented Jun 3, 2022

Fixes #2543, which was failing due to not validating that the API response matches the declared TS type; that lead to code making invalid assumptions, and failing to display the proceed-anyway dialog.

It wasn't only failing for approvals, but also submissions of messages with warnings.

Sorry, this one was my fault.

@eemeli eemeli requested a review from mathjazz June 3, 2022 16:26
Copy link
Collaborator

@mathjazz mathjazz left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

It seems like we could benefit from a bit better test coverage here to avoid similar situations in the future.

@mathjazz mathjazz merged commit 27b1440 into mozilla:master Jun 5, 2022
@eemeli
Copy link
Member Author

eemeli commented Jun 5, 2022

Agreed in general, but adding tests for TS types is difficult.

@eemeli eemeli deleted the fix-warnings branch June 5, 2022 02:30
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.

Warnings don't show up in the Translate View
2 participants