Skip to content

Commit

Permalink
Add comment explaining parsedBody object
Browse files Browse the repository at this point in the history
  • Loading branch information
caleballdrin committed Jan 8, 2025
1 parent 41e7321 commit 3918291
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pages/api/graphql-rest.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class MpdxRestApi extends RESTDataSource {
parsedBody: unknown;
}): Promise<GraphQLError> {
const error = await super.errorFromResponse({ response, parsedBody });
// parsedBody has the unknown type so we have to check that it is an object with the expected structure
const restError =
parsedBody &&
typeof parsedBody === 'object' &&
Expand Down

0 comments on commit 3918291

Please sign in to comment.