mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-29 05:51:26 +08:00
fix(错误处理): 使用JSON.stringify格式化响应头信息以提高可读性
This commit is contained in:
parent
baa7a1b9a6
commit
3114623a33
@ -220,7 +220,7 @@ export function formatAiSdkError(error: SerializedAiSdkError): string {
|
||||
const requestBodyValues = safeToString(error.requestBodyValues)
|
||||
text += `${t('error.requestBodyValues')}: ${requestBodyValues}\n`
|
||||
if (error.responseHeaders) {
|
||||
text += `${t('error.responseHeaders')}: ${error.responseHeaders}\n`
|
||||
text += `${t('error.responseHeaders')}: ${JSON.stringify(error.responseHeaders, null, 2)}\n`
|
||||
}
|
||||
if (error.responseBody) {
|
||||
text += `${t('error.responseBody')}: ${error.responseBody}\n`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user