fix: improved error message formatting in api service

This commit is contained in:
kangfenmao 2025-01-07 10:19:21 +08:00
parent 2e7ecbc753
commit 4896db93fd

View File

@ -232,7 +232,11 @@ function formatErrorMessage(error: any): string {
try {
return (
'```json\n' +
JSON.stringify(error?.response?.data || error?.response || error?.request || error, null, 2) +
JSON.stringify(
error?.error?.message || error?.response?.data || error?.response || error?.request || error,
null,
2
) +
'\n```'
)
} catch (e) {