Skip to content

error-map: extractCode() misses nested error.code envelopes (Stripe/OpenAI style) #12

Description

@Railly

Context

registry/foundation/error-map.ts extractCode() checks obj.code, obj.status, obj.statusCode, obj.response.status — but the common { error: { code: "..." } } envelope falls through to UNKNOWN.

Task

Add obj.error?.code / obj.error?.type to the candidate chain.

Acceptance criteria

Test case for { error: { code: "AUTH_EXPIRED" } } maps correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions