[API Node] Better execution error handling (#3587)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-04-23 11:15:38 -04:00
committed by GitHub
parent 9e10e55633
commit 4c23cfbd4d
11 changed files with 14 additions and 159 deletions

View File

@@ -674,13 +674,18 @@ export class ComfyApp {
api.addEventListener('execution_error', ({ detail }) => {
// Check if this is an auth-related error or credits-related error
if (detail.exception_message === 'Please login first to use this node.') {
useDialogService().showSignInRequiredDialog({ type: 'signIn' })
if (
detail.exception_message ===
'Unauthorized: Please login first to use this node.'
) {
useDialogService().showApiNodesSignInDialog([detail.node_type])
} else if (
detail.exception_message ===
'Payment Required: Please add credits to your account to use this node.'
) {
useDialogService().showSignInRequiredDialog({ type: 'credits' })
useDialogService().showTopUpCreditsDialog({
isInsufficientCredits: true
})
} else {
useDialogService().showExecutionErrorDialog(detail)
}