chore: log error stack
This commit is contained in:
parent
c5ac27119e
commit
695bf53262
1 changed files with 2 additions and 2 deletions
|
|
@ -170,12 +170,12 @@ export class StreamResolver {
|
|||
}
|
||||
|
||||
if (error instanceof HttpError) {
|
||||
this.logger.error(`${source}: HTTP status ${error.status} (${error.statusText}), headers: ${JSON.stringify(error.headers)}.`, ctx);
|
||||
this.logger.error(`${source}: HTTP status ${error.status} (${error.statusText}), headers: ${JSON.stringify(error.headers)}, stack: ${error.stack}.`, ctx);
|
||||
return `❌ Request failed with status ${error.status} (${error.statusText}). Request-id: ${ctx.id}.`;
|
||||
}
|
||||
|
||||
const cause = (error as Error & { cause?: unknown }).cause;
|
||||
this.logger.error(`${source} error: ${error}, cause: ${cause}`, ctx);
|
||||
this.logger.error(`${source} error: ${error}, cause: ${cause}, stack: ${(error as Error).stack}`, ctx);
|
||||
|
||||
return `❌ Request failed. Request-id: ${ctx.id}.`;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue