Closed matt-fidd closed 1 week ago
The pull request introduces changes to the error handling logic within the /transactions
endpoint of the GoCardless application. The primary modification involves altering the method of checking for Axios errors; instead of using the isAxiosError
function, the code now directly accesses the isAxiosError
property on the error object. This adjustment aims to simplify the detection of Axios-related errors. The existing error handling structure remains unchanged, with specific cases still defined for various error types, including RequisitionNotLinked
, AccountNotLinkedToRequisition
, RateLimitError
, and GenericGoCardlessError
. Each case constructs a response object containing relevant error details to be sent back to the client. The overall control flow and logic for handling successful responses are preserved, ensuring that the application continues to function correctly based on the outcomes of service calls. No changes were made to the declarations of exported or public entities.
AccountNotLinkedToRequisition
error, which is directly related to the changes made in PR #465 that corrects the naming of this error class.[!WARNING]
Review ran into problems
🔥 Problems
Git: Failed to clone repository. Please run the `@coderabbitai full review` command to re-trigger a full review.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Closing, root cause of the error is not what we thought
Reported in discord, this is causing an issue because it's not in the package.json
To avoid adding a large dependency I've rolled our own here, referencing https://github.com/axios/axios/blob/5d54d22321b3c3d29c5dff5e8086cd9db7e2d101/lib/helpers/isAxiosError.js#L12