mirror of https://github.com/actions/toolkit
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 neededpull/1948/head
parent
340a6b15b5
commit
554fdcd2ec
|
@ -244,7 +244,7 @@ export function debug(message: string): void {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an error issue
|
* 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.
|
* @param properties optional properties to add to the annotation.
|
||||||
*/
|
*/
|
||||||
export function error(
|
export function error(
|
||||||
|
@ -254,7 +254,7 @@ export function error(
|
||||||
issueCommand(
|
issueCommand(
|
||||||
'error',
|
'error',
|
||||||
toCommandProperties(properties),
|
toCommandProperties(properties),
|
||||||
message instanceof Error ? message.toString() : message
|
message instanceof Error ? message.stack : message
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue