File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
apps/report/src/components Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,28 @@ const DetailSide = (): JSX.Element => {
327
327
/>
328
328
) ;
329
329
} ) ;
330
- } else if ( task ?. error ) {
330
+ } else if ( task ?. error || task ?. errorMessage ) {
331
+ let errorContent = '' ;
332
+
333
+ // prefer errorMessage
334
+ if ( task . errorMessage ) {
335
+ errorContent = task . errorMessage ;
336
+ } else if ( task . error ) {
337
+ // if no errorMessage, try to show error object
338
+ if ( typeof task . error === 'string' ) {
339
+ errorContent = task . error ;
340
+ } else if ( typeof task . error === 'object' && task . error . message ) {
341
+ errorContent = task . error . message ;
342
+ } else {
343
+ errorContent = JSON . stringify ( task . error , null , 2 ) || 'Unknown error' ;
344
+ }
345
+ }
346
+
347
+ // add stack info (if exists and not duplicate)
348
+ if ( task . errorStack && ! errorContent . includes ( task . errorStack ) ) {
349
+ errorContent += `\n\nStack:\n${ task . errorStack } ` ;
350
+ }
351
+
331
352
outputDataContent = (
332
353
< Card
333
354
liteMode = { true }
@@ -336,7 +357,7 @@ const DetailSide = (): JSX.Element => {
336
357
onMouseLeave = { noop }
337
358
content = {
338
359
< pre className = "description-content" style = { { color : '#F00' } } >
339
- { task . error }
360
+ { errorContent }
340
361
</ pre >
341
362
}
342
363
/>
You can’t perform that action at this time.
0 commit comments