Skip to content

Commit

Permalink
Log networkError
Browse files Browse the repository at this point in the history
  • Loading branch information
moreal authored Dec 25, 2023
1 parent 4a610f5 commit 39b970c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/headless-graphql-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export class HeadlessGraphQLClient implements IHeadlessGraphQLClient {
// https://formidable.com/open-source/urql/docs/basics/errors/
// This automatically distinguish, log, process Network / GQL error.
if (error.networkError) {
console.log(error);
console.log(error.networkError);
const fallback = this.getEndpoint();
console.log(`Fallback RPC: ${fallback}`);
const context = {
Expand Down

0 comments on commit 39b970c

Please sign in to comment.