AntFleet

Disagreement · 7284403c-openai-2

Error message extraction may serialize nested error objects as [object Object] (unclear error messages)

solo GPT-5
repo 799b2361·PR #2·reviewed 5 days ago

GPT-5 finding

Error message extraction may serialize nested error objects as [object Object] (unclear error messages)

lowmaintainabilitymedium
  • 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.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →

From the same review

These findings passed the unanimous gate on the same PR review. The disagreement above was filtered out; the findings below were posted.