Skip to content

Commit

Permalink
fix: Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Nov 21, 2023
1 parent 74a4c17 commit 34de220
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api.planx.uk/lib/hasura/metadata/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ const postToMetadataAPI = async (
},
);
} catch (error) {
const isAxiosErrorBool = isAxiosError(error);
const errorMessage = isAxiosErrorBool
const errorMessage = isAxiosError(error)
? JSON.stringify(error.toJSON())
: (error as Error).message;
throw Error(`Failed to POST to Hasura Metadata API: ${errorMessage}`);
Expand Down

0 comments on commit 34de220

Please sign in to comment.