cherry-studio/src/main
Zhaokun bf35228b49
fix: capture detailed error response body for reranker API failures (#10839)
* fix: capture detailed error response body for reranker API failures

Previously, when reranker API returned 400 or other error status codes,
only the HTTP status and status text were captured, without reading the
actual error response body that contains detailed error information.

This commit fixes the issue by:
- Reading the error response body (as JSON or text) before throwing error
- Attaching the response details to the error object
- Including responseBody in formatErrorMessage output

This will help diagnose issues like "qwen3-reranker not available" by
showing the actual error message from the API provider.

* fix: enhance error handling in GeneralReranker for API failures

This update improves the error handling in the GeneralReranker class by ensuring that the response body is properly cloned and read when an API call fails. The detailed error information, including the status, status text, and body, is now attached to the error object. This change aids in diagnosing issues by providing more context in error messages.
2025-10-21 10:36:53 +08:00
..
apiServer fix: improve api-server startup and error handling logic (#10794) 2025-10-18 14:15:08 +08:00
configs fix[SelectionAssistant]: shift+click behavior in macOS and clipboard behavior in Windows (#8390) 2025-07-23 17:24:26 +08:00
integration feat: enable cherryin provider 2025-09-23 20:19:05 +08:00
knowledge fix: capture detailed error response body for reranker API failures (#10839) 2025-10-21 10:36:53 +08:00
mcpServers feat: add built-in DiDi MCP server integration (#10318) 2025-10-17 10:37:07 +08:00
services fix: agent supported model filter (#10788) 2025-10-17 20:52:15 +08:00
utils Merge branch 'main' of github.com:CherryHQ/cherry-studio into feat/agents-new 2025-09-28 15:03:36 +08:00
bootstrap.ts refactor: move initAppDataDir function to a new utils module (#8337) 2025-07-21 15:46:14 +08:00
config.ts feat: enable cherryin provider 2025-09-23 20:19:05 +08:00
constant.ts feat: support portable config dir (#5039) 2025-04-24 17:23:56 +08:00
electron.d.ts feat: add the ability to display the application in tray #297 2024-11-09 08:42:09 +08:00
env.d.ts feat: added vite_main_bundle_id config and improved code cleanliness 2024-09-15 10:35:02 +08:00
index.ts feat: auto-start API server when agents exist (#10772) 2025-10-17 20:53:08 +08:00
ipc.ts feat: new build-in OCR provider -> intel OV(NPU) OCR (#10737) 2025-10-17 15:18:00 +08:00