1
0
Fork 0

core.setFailed and core.error to include stack trace to make debugging and triaging easier

currently its impossible to know which place in the code caused an error if you have simple syntax errors like `replace is not a function`.

and if I get an report of an error with my action, report won't have anything meaningful to mention, which makes triaging process few steps longer than needed
pull/1948/head
Vladimir Starkov 2025-01-31 13:30:07 +01:00 committed by GitHub
parent 340a6b15b5
commit 554fdcd2ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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
)
}