Skip to content

fix(api-rdi): align fallback status checks with Axios error format - #6416

Open
AleksaMCode wants to merge 2 commits into
redis:mainfrom
AleksaMCode:be/bugfix/fix-rdi-axios-status-check
Open

fix(api-rdi): align fallback status checks with Axios error format#6416
AleksaMCode wants to merge 2 commits into
redis:mainfrom
AleksaMCode:be/bugfix/fix-rdi-axios-status-check

Conversation

@AleksaMCode

@AleksaMCode AleksaMCode commented Aug 15, 2026

Copy link
Copy Markdown

What

Updated RDI error handling to align with real Axios error objects.

Docs:

Testing

  • Updated/validated unit test expectations to reflect Axios-shaped errors (response.status) for these flows.

Note

Low Risk
Narrow error-handling fix in the RDI HTTP client; restores intended dev-login and legacy-RDI 405 behavior without broader API changes.

Overview
RDI API client fallback paths that depend on HTTP status now read response.status on real Axios errors instead of a top-level status field, using axios.isAxiosError before branching.

Login: A 404 on /login still triggers dev-mode dummy JWT auth, but only when the rejection is an Axios error with response.status === NOT_FOUND.

Test source connections: 405 still maps to the “upgrade to 1.6.0+” message for older RDI; other failures still get the generic connection error. Catch typing moves from any to unknown.

Tests: The axiosError helper and dev-login mock rejections are shaped like Axios errors (isAxiosError, response.status), and isAxiosError is stubbed in beforeEach so unit tests match production checks.

Reviewed by Cursor Bugbot for commit d6dc81d. Bugbot is set up for automated code reviews on this repo. Configure here.

@AleksaMCode
AleksaMCode requested a review from a team as a code owner August 15, 2026 10:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b382b0f2fd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit b382b0f. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant