From 8337768c5a0575ccf98687b68b81e9e76aa780f1 Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 22 Apr 2025 17:02:04 +0800 Subject: [PATCH] fix: check the error type and return as string --- src/pages/playground/config/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/playground/config/index.ts b/src/pages/playground/config/index.ts index 735dfe80..d24f7d5f 100644 --- a/src/pages/playground/config/index.ts +++ b/src/pages/playground/config/index.ts @@ -175,7 +175,7 @@ export const extractErrorMessage = (result: any) => { result?.error?.message || result?.data; if (errorMsg) { - return errorMsg; + return typeof errorMsg === 'string' ? errorMsg : JSON.stringify(errorMsg); } try { return typeof result === 'string' ? result : JSON.stringify(result);