Skip to content

Commit c209ab8

Browse files
committed
chore(utils/safeExtractMessageAndStackFromError): add explicit return type to have it as a named tuple
1 parent 4ca725d commit c209ab8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/services/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export function processStringOrBuffer(data: string | Buffer | null) {
362362
}
363363
}
364364

365-
export function safeExtractMessageAndStackFromError(err: unknown) {
365+
export function safeExtractMessageAndStackFromError(err: unknown): [errMessage: string, errStack: string | undefined] {
366366
return (err instanceof Error) ? [err.message, err.stack] as const : ["Unknown Error", undefined] as const;
367367
}
368368

0 commit comments

Comments
 (0)