GPT-5 finding
Error message extraction may serialize nested error objects as [object Object] (unclear error messages)
- src/api/platform.ts:223-225
Many APIs respond with shapes like { error: { message: '...' } }. pickErr returns body.error directly, which may be an object. Template interpolation will emit "[object Object]" instead of a useful message, degrading user-facing errors.
Recommendation
Expand pickErr to handle common shapes: - If body.error is an object, try (body.error.message || body.error.detail || JSON.stringify(body.error)). - If body.errors is an array, surface the first .message/detail. - Fallback to body.message/body.detail. This preserves useful messages in non-2xx responses.