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
Fix batchRest
not throwing errors in Playwright
#40668
Conversation
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
Is it possible for some parts of a batch to succeed and others fail? If so, then it sounds like it's working correctly. If all the requests fail (which I guess was the case here?), then perhaps that's a case where it might return an error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👍
What?
Fix
batchRest
incorrectly swallowing errors.Turns out the batch API will still return 2XX status code even when some of the requests failed. We have to manually check the
failed
field in the response. Not sure if it's a bug or not.This PR also fixes an existing bug in the widgets util. Surprisingly, it didn't affect any of the tests though, maybe we don't need them.
Why?
The bug makes it hard to debug why the API doesn't work in some context.
How?
Check the
failed
field and re-throw the errors.Testing Instructions
CI should pass.