Divyanshu-s13 opened a new pull request, #3371: URL: https://github.com/apache/apisix-dashboard/pull/3371
Why submit this pull request? - [ ] Bugfix - [ ] New feature provided - [ ] Improve performance - [ ] Backport patches What changes will this PR take into? Summary of change: 1. Updated the catch logic in [credentials.ts] to safely handle Axios errors where response is missing. 2. Replaced direct access of e.response.status with a guarded check using axios.isAxiosError(e) and optional chaining. 3. Preserved existing behavior: 4. Return empty list when HTTP status is 404. 5. Re-throw all other errors. Problem solved: 1. Prevents secondary runtime errors like Cannot read properties of undefined (reading status) during network/CORS/timeout failures. 2. Ensures original error propagation remains intact for non-404 failures. Related issues fix/resolve #3370 Checklist: - [ ] Did you explain what problem does this PR solve? Or what new features have been added? - [ ] Have you added corresponding test cases? - [ ] Have you modified the corresponding document? - [ ] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
