mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-10 15:49:29 +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 {
|
try {
|
||||||
return (
|
return (
|
||||||
'```json\n' +
|
'```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```'
|
'\n```'
|
||||||
)
|
)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user