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.
Context
registry/foundation/error-map.tsextractCode()checksobj.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?.typeto the candidate chain.Acceptance criteria
Test case for
{ error: { code: "AUTH_EXPIRED" } }maps correctly.