Skip to content

Commit

Permalink
Failing tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuhair2002 committed Oct 18, 2024
1 parent 3073105 commit 7649790
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/graphqlTS/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export async function graphqlTS({
if (error.message && !error.response) {
throw { error_message: error.message };
}
if (error.response.status === 401) {
if (error.response.status === 412) {
throw {
error_message:
"Unauthorized: The apiKey, token or environment is not valid.",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/graphqlTS/graphqlTS.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe("graphqlTS function with errors", () => {

nock(GRAPHQL_REGION_URL_MAPPING[region])
.post(`/${apiKey}?environment=${environment}`)
.reply(401);
.reply(412);

try {
await graphqlTS({
Expand Down

0 comments on commit 7649790

Please sign in to comment.