@@ -33,7 +33,7 @@ module.exports = async function (context, req) {
3333 && req . body . comment . body . startsWith ( '/' ) ) return ok ( await slashCommand ( context , req ) )
3434 } catch ( e ) {
3535 context . log ( e )
36- return withStatus ( 500 , undefined , e . toString ( 'utf-8' ) )
36+ return withStatus ( 500 , undefined , e . message || JSON . stringify ( e , null , 2 ) )
3737 }
3838
3939 try {
@@ -46,7 +46,7 @@ module.exports = async function (context, req) {
4646 && req . body . workflow_job . labels [ 1 ] === 'ARM64' ) return ok ( await selfHostedARM64Runners ( context , req ) )
4747 } catch ( e ) {
4848 context . log ( e )
49- return withStatus ( 500 , undefined , e . toString ( 'utf-8' ) )
49+ return withStatus ( 500 , undefined , e . message || JSON . stringify ( e , null , 2 ) )
5050 }
5151
5252 try {
@@ -56,7 +56,7 @@ module.exports = async function (context, req) {
5656 && req . body . action === 'completed' ) return ok ( await cascadingRuns ( context , req ) )
5757 } catch ( e ) {
5858 context . log ( e )
59- return withStatus ( 500 , undefined , e . toString ( 'utf-8' ) )
59+ return withStatus ( 500 , undefined , e . message || JSON . stringify ( e , null , 2 ) )
6060 }
6161
6262 context . log ( "Got headers" )
0 commit comments