Repository navigation
fix(client): return axios response headers whole - #488
Conversation
🟢 Risk Classification: LOWApproval route: AI Auto-Approval Classification reasons
Operational gates
Files analysed: 2 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
There was a problem hiding this comment.
✅ Auto-approved — this PR meets all Low-risk criteria.
All checks passed, no unresolved comments, and the change classification is:
no_low_class_matchedprod_source_modified2.2.6_logical_extension:The change only refactors the existing axios header-reading logic to fix a bug (returning full string values instead of first characters) by unifying it with the existing fetch header reader, with no new endpoints, persisted data, auth changes, or external integrations introduced.
wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…
5768e53 to
cb58441
Compare
🟢 Risk Classification: LOWApproval route: AI Auto-Approval Classification reasons
Operational gates
Files analysed: 2 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
There was a problem hiding this comment.
✅ Auto-approved — this PR meets all Low-risk criteria.
All checks passed, no unresolved comments, and the change classification is:
no_low_class_matchedprod_source_modified2.2.6_logical_extension:The change is a non-destructive bug fix that unifies header reading logic between axios and fetch clients using existing abstractions, introduces no new endpoints, persisted data, auth changes, or external integrations.
wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…
With the axios client, cko-request-id, cko-version and etag were read with [0], but axios returns header values as strings, so only their first character was returned. A response without cko-request-id also returned no headers at all, so its etag was lost. The axios response now reads its headers with the same function as fetch, so both clients return the same values. Headers an application interceptor turned into a plain object are read as properties, so those calls still succeed. The request id of a 3xx error is read the same way, so it is kept when an interceptor turned the headers into a plain object.
cb58441 to
3eeb820
Compare
🟢 Risk Classification: LOWApproval route: AI Auto-Approval Classification reasons
Operational gates
Files analysed: 2 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
|
There was a problem hiding this comment.
✅ Auto-approved — this PR meets all Low-risk criteria.
All checks passed, no unresolved comments, and the change classification is:
no_low_class_matchedprod_source_modified2.2.6_logical_extension:The change only refactors how existing response headers are read (fixing a bug where axios header values were incorrectly indexed with [0]), reuses existing code paths and abstractions, adds no new endpoints or external integrations, and does not persist any new data.
wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…



Summary
With
httpClient: 'axios', thecko-request-id,cko-versionandetagvalues inresponse.headerscame back as their first character only (req_abcreturnedr). The axios path read them with[0], but axios returns header values as strings. The default fetch client was not affected.Changes
src/services/http.js: the axios response reads its headers withgetResponseHeaders, the same function as the fetch response; the axios-only reader is removed. Each header is read throughheaderOf, and the request id throughrequestIdOf, which the 3xx errors also use: a 3xx whose headers an axios interceptor turned into a plain object now has itsrequest_idin the error body, as withAxiosHeaders.test/http/responseHeaders.js: new tests against a local server for both clients: whole values, therequest-idandversionfallbacks, anetagwithout a request id, no headers, headers an axios interceptor turned into a plain object, on a 2xx and on a 3xx.Design notes: axios response headers are an
AxiosHeadersobject withget(), as fetchHeadersare, so one reader serves both clients.requestIdOfread the 3xx request id withget()only; it now goes throughheaderOftoo, so the request id is read in one place for every response. The SDK uses the default axios instance, so an application response interceptor applies to its calls; one that rebuilds the response can leave the headers as a plain object withoutget().headerOfreads those as properties, so such calls keep succeeding as they did before this change. No header value needs indexing: every value the SDK reads is a string with both clients. With axios, Node's HTTP parser joins a repeatedcko-request-idorcko-versionwith,and keeps the firstetag; fetchHeaders.get()joins every repeated header,etagincluded. Onlyset-cookiecomes as an array in axios, and the SDK does not read it.API Reference
None.
Breaking changes
None. With axios, a response without
cko-request-idnow returns the three keys (empty when the header is absent) instead of an empty object, as the fetch client always has; this keeps theetagthat was dropped before.Tests
write ECANCELEDon master as well)Related
None.