[Refactor] Unify error dialog component (#3265)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-03-28 11:53:29 -04:00
committed by GitHub
parent 62fdcd4949
commit 504b717575
13 changed files with 178 additions and 228 deletions

View File

@@ -4,15 +4,15 @@ import type { SystemStats } from '@/schemas/apiSchema'
import type { NodeId } from '@/schemas/comfyWorkflowSchema'
export interface ErrorReportData {
exception_type: string
exception_message: string
exceptionType: string
exceptionMessage: string
systemStats: SystemStats
serverLogs: string
workflow: ISerialisedGraph
traceback?: string[]
node_id?: NodeId
node_type?: string
traceback?: string
nodeId?: NodeId
nodeType?: string
}
/**
@@ -35,13 +35,13 @@ export function generateErrorReport(error: ErrorReportData): string {
${
error
? `## Error Details
- **Node ID:** ${error.node_id || 'N/A'}
- **Node Type:** ${error.node_type || 'N/A'}
- **Exception Type:** ${error.exception_type || 'N/A'}
- **Exception Message:** ${error.exception_message || 'N/A'}
- **Node ID:** ${error.nodeId || 'N/A'}
- **Node Type:** ${error.nodeType || 'N/A'}
- **Exception Type:** ${error.exceptionType || 'N/A'}
- **Exception Message:** ${error.exceptionMessage || 'N/A'}
## Stack Trace
\`\`\`
${error.traceback ? error.traceback.join('\n') : 'No stack trace available'}
${error.traceback || 'No stack trace available'}
\`\`\``
: ''
}