diff --git a/packages/core/src/core.ts b/packages/core/src/core.ts index 0a141693..8ebd0a7f 100644 --- a/packages/core/src/core.ts +++ b/packages/core/src/core.ts @@ -244,7 +244,7 @@ export function debug(message: string): void { /** * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() + * @param message error issue message. error.stack will be used for Errors * @param properties optional properties to add to the annotation. */ export function error( @@ -254,7 +254,7 @@ export function error( issueCommand( 'error', toCommandProperties(properties), - message instanceof Error ? message.toString() : message + message instanceof Error ? message.stack : message ) }