-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
GraphQL Replication error missing information #5952
Comments
This is not intentional. If any information is missing in the thrown error, we can add it. Please make a PR. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat |
Still relevant. We will create a MR |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag. |
If the GraphQL server returns an error in the errors json response, it usually includes a code (most of the time a string like AUTHENTICATION_ERROR) in the extensions object. The extensions object is a place to also add other arbitrary information according to the spec.
Starting with RxDB 14 errors seem to be normalized and the graphql replication will just throw an error with the errors array as seen here: https://github.com/pubkey/rxdb/blob/master/src/plugins/replication-graphql/index.ts#L167
The normalized errors do not contain the extensions object anymore, which in our case breaks token refresh, because we cannot detect the proper error code anymore.
Is this behaviour intentional or a bug?
The text was updated successfully, but these errors were encountered: