mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-31 13:29:55 +00:00
[API Node] Better execution error handling (#3587)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user