mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-02 19:49:58 +00:00
[bugfix] Handle backend error messages with appended content (#4283)
This commit is contained in:
@@ -669,13 +669,15 @@ export class ComfyApp {
|
||||
api.addEventListener('execution_error', ({ detail }) => {
|
||||
// Check if this is an auth-related error or credits-related error
|
||||
if (
|
||||
detail.exception_message ===
|
||||
'Unauthorized: Please login first to use this node.'
|
||||
detail.exception_message?.includes(
|
||||
'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.'
|
||||
detail.exception_message?.includes(
|
||||
'Payment Required: Please add credits to your account to use this node.'
|
||||
)
|
||||
) {
|
||||
useDialogService().showTopUpCreditsDialog({
|
||||
isInsufficientCredits: true
|
||||
|
||||
Reference in New Issue
Block a user