Skip to content

Commit

Permalink
fix: print full error stack in message where fetch is failing (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
RohinBhargava authored Nov 6, 2024
1 parent 00a82a0 commit 5c00b36
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions servers/fdr/src/controllers/docs/v2/getDocsWriteV2Service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,9 @@ export function getDocsWriteV2Service(app: FdrApplication): DocsV2WriteService {
return await fetch(
`https://${docsRegistrationInfo.fernUrl.getFullUrl()}/api/fern-docs/api-definition/${apiDefinition.id}/endpoint/${endpoint.originalEndpointId}`,
);
} catch (e) {
} catch (e: Error | unknown) {
app.logger.error(
`Error while trying to warm endpoint cache for ${docsRegistrationInfo.fernUrl}`,
e,
`Error while trying to warm endpoint cache for ${JSON.stringify(docsRegistrationInfo.fernUrl)} ${e instanceof Error ? e.stack : ""}`,
);
throw e;
}
Expand Down

0 comments on commit 5c00b36

Please sign in to comment.