[bugfix] Handle backend error messages with appended content (#4283)

This commit is contained in:
Christian Byrne
2025-06-27 13:47:21 -07:00
committed by GitHub
parent 2d2cec2e79
commit 7620bb9063

View File

@@ -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