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

fix: Fail requests when encoding request body fails. #215

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crleona
Copy link
Collaborator

@crleona crleona commented Aug 20, 2024

Summary

Adds a new failure before trying to send a network request if we cannot encode the request body. Defensively, we will try to re-encode the request body without our diagnostic data in case that is the source of the problem. If this also fails, we delete the invalid events.

This also moves the callback handler for failures to the expected callbackQueue.

TODO: add tests

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

@crleona crleona force-pushed the AMP-107637-fix-rerequest-bad-data branch from a67e519 to 1294899 Compare August 20, 2024 01:36
@crleona crleona force-pushed the AMP-107637-fix-rerequest-bad-data branch from 1294899 to 79a51c2 Compare August 20, 2024 01:47
Copy link
Contributor

@yuhao900914 yuhao900914 left a comment

Choose a reason for hiding this comment

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

LGTM;

@yuhao900914 yuhao900914 requested a review from a team August 20, 2024 18:14
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