You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Promise rejection without error in instance.orders.create() #385
`(node:15211) Warning: a promise was rejected with a non-error: [object Object]`
Logging the error returns `{ statusCode: undefined, error: undefined }`.
Expected behavior
Should return the error if there is any.
Actual behavior
Sometimes the promise resolves itself without any error and sometimes it doesn't.
Activity
sahilgupta88 commentedon Jul 16, 2024
Im facing the similar error, it doesnot work on the first click but subsequent clicks work fine:
` const razorpay = new Razorpay({
key_id: req.body.keyId,
key_secret: req.body.KeySecret,
});
Error:
TypeError: Cannot read properties of undefined (reading 'status')
[0] at normalizeError (/node_modules/razorpay/dist/api.js:40:30)
yorihaput commentedon Jun 2, 2026
I think
this issue still open?
I got same issue when use this library
Error:
TypeError: Cannot read properties of undefined (reading 'status')
[0] at normalizeError (/node_modules/razorpay/dist/api.js:40:30)
this happend when there is no connectify from Axios to the server API, can we fix this to remove normalizeError when catch the error from axios?
or maybe if there is no response, throw the real error, not normalized error in function normalizeError