mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
fix: improved error message formatting in api service
This commit is contained in:
parent
abf4d90f4e
commit
7cadb0017c
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user