From 7620bb9063093ab2c70c1f68d81ac1f4652a8900 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Fri, 27 Jun 2025 13:47:21 -0700 Subject: [PATCH] [bugfix] Handle backend error messages with appended content (#4283) --- src/scripts/app.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/scripts/app.ts b/src/scripts/app.ts index 31d2ba1ccb..bbef80cb4e 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -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