Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
feat(sentry): send response, request url and status to sentry when re…
Browse files Browse the repository at this point in the history
…sponse.json() fails
  • Loading branch information
justinwhall committed Jul 22, 2021
1 parent 773454c commit fc3e392
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/services/fetchComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ export async function fetchComponents(routeMeta, routeCookies) {
const apiError = new Error(`API error: ${error}`);
log.error(apiError, {
tags: createRouteLogTags(routeMeta, env),
additionalData: {
response,
reqUrl: response.url,
status: response.status,
},
});

throw apiError;
}

Expand Down

0 comments on commit fc3e392

Please sign in to comment.