Skip to content

Commit

Permalink
Set InvalidGraphQLResponseError name
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek committed Mar 22, 2024
1 parent 71654ed commit d10ad83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ export type ClientError =
export class InvalidGraphQLResponseError extends Error {
response: unknown;
constructor(response: unknown) {
super(`Received an invalid GraphQL response`);
super("Received an invalid GraphQL response");
this.name = this.constructor.name;
this.response = response;
Object.setPrototypeOf(this, InvalidGraphQLResponseError.prototype);
}
}

Expand Down

0 comments on commit d10ad83

Please sign in to comment.