diff --git a/internal/workflow/dispatcher/dispatcher.go b/internal/workflow/dispatcher/dispatcher.go
index ef4ad2e8f..566c0482f 100644
--- a/internal/workflow/dispatcher/dispatcher.go
+++ b/internal/workflow/dispatcher/dispatcher.go
@@ -200,8 +200,8 @@ func (wd *workflowDispatcher) tryExecuteAsync(task *taskInfo) {
// 捕获 panic
defer func() {
if r := recover(); r != nil {
- slog.Default().Warn(fmt.Sprintf("workflow dispatcher panic: %v, stack trace: %s", r, string(debug.Stack())), slog.Any("workflowId", task.WorkflowId), slog.Any("runId", task.RunId))
- wd.syslog.Error(fmt.Sprintf("workflow dispatcher panic: %v", r), slog.Any("workflowId", task.WorkflowId), slog.Any("runId", task.RunId))
+ wd.syslog.Error(fmt.Sprintf("workflow dispatcher panic: %v", r), slog.String("workflowId", task.WorkflowId), slog.String("runId", task.RunId))
+ slog.Default().Error(fmt.Sprintf("workflow dispatcher panic: %v, stack trace: %s", r, string(debug.Stack())), slog.String("workflowId", task.WorkflowId), slog.String("runId", task.RunId))
if workflowRun != nil {
workflowRun.Status = domain.WorkflowRunStatusTypeFailed
diff --git a/internal/workflow/engine/engine.go b/internal/workflow/engine/engine.go
index 29a7525eb..aea61bfa4 100644
--- a/internal/workflow/engine/engine.go
+++ b/internal/workflow/engine/engine.go
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"log/slog"
+ "runtime/debug"
"sync"
"github.com/samber/lo"
@@ -58,6 +59,8 @@ func (we *workflowEngine) Invoke(ctx context.Context, execution WorkflowExecutio
defer func() {
if r := recover(); r != nil {
we.fireOnErrorHooks(ctx, fmt.Errorf("workflow engine panic: %v", r))
+ we.syslog.Error(fmt.Sprintf("workflow engine panic: %v", r), slog.String("workflowId", execution.WorkflowId), slog.String("runId", execution.RunId))
+ slog.Default().Error(fmt.Sprintf("workflow engine panic: %v, stack trace: %s", r, string(debug.Stack())), slog.String("workflowId", execution.WorkflowId), slog.String("runId", execution.RunId))
}
}()
diff --git a/internal/workflow/engine/state.go b/internal/workflow/engine/state.go
index 7005fefbc..f87aaa229 100644
--- a/internal/workflow/engine/state.go
+++ b/internal/workflow/engine/state.go
@@ -18,7 +18,7 @@ type VariableState struct {
func (s VariableState) ValueString() string {
switch s.ValueType {
case "string":
- return s.Value.(string)
+ return fmt.Sprintf("%s", s.Value)
case "number":
return fmt.Sprintf("%d", s.Value)
case "boolean":
diff --git a/ui/src/App.tsx b/ui/src/App.tsx
index bbd03f147..794033cc0 100644
--- a/ui/src/App.tsx
+++ b/ui/src/App.tsx
@@ -1,7 +1,7 @@
import { useEffect, useLayoutEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { RouterProvider } from "react-router-dom";
-import { App, ConfigProvider, type ThemeConfig, theme } from "antd";
+import { Alert, App, ConfigProvider, type ThemeConfig, theme } from "antd";
import { type Locale } from "antd/es/locale";
import AntdLocaleEnUs from "antd/locale/en_US";
import AntdLocaleZhCN from "antd/locale/zh_CN";
@@ -107,9 +107,11 @@ const RootApp = () => {
},
}}
>
-