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

Improve Apollo 4 error capturing #4165

Open
lcian opened this issue Feb 14, 2025 · 2 comments
Open

Improve Apollo 4 error capturing #4165

lcian opened this issue Feb 14, 2025 · 2 comments

Comments

@lcian
Copy link
Member

lcian commented Feb 14, 2025

Description

The Apollo 4 migration guide mentions that "fetch errors like network errors, cache misses, and parsing errors [...] are now surfaced by returning (for execute()) or emitting (for Flows) an ApolloResponse with a non-null exception instead of throwing it".

We are currently using the same logic for Apollo 4 as for Apollo 3.
We should investigate in which specific cases this field is set and if the SDK is behaving correctly in those cases (sending an error or a warning/error level breadcrumb).

After some preliminary tests, it seems that the logic for Apollo 3, without special handling for the new exception field, leads to the same behaviour of the SDK for Apollo 4 as for Apollo 3, as in both cases we can tell if an operation failed by the presence of the errors field in the response body or by looking at the HTTP response code.

@markushi
Copy link
Member

Let's not forget to update our docs for Apollo 4 support.

@markushi markushi moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Feb 19, 2025
@markushi markushi moved this from Needs Investigation to Backlog in Mobile & Cross Platform SDK Feb 19, 2025
@kahest
Copy link
Member

kahest commented Feb 19, 2025

related: #3662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants