Replies: 1 comment 1 reply
-
It looks like a normal redirect. Axios does not have a mystery code that changes the request URL to a different endpoint. Test that endpoint using Postman. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using axios to make API calls to paystack, a payment integration platform. At first it all goes well with no issues, then all of a sudden, it starts to throw 404 not found error, when I check my logs, I find it is accessing the wrong url. After I couldn't find any visible issues, I wrote the code again, and this time I changed the endpoint accessing the logic that contained the axios configuration, but it only worked for one issue, and then 3 other endpoints started misbehaving that way.
For example, this is a sample of the axios configuration I am using in one logic;
const options = {
method: 'GET',
url:
https://api.paystack.co/transaction/verify/${trxReference}
,headers: {
Authorization:
Bearer ${Environment.PAYSTACK_SECRET_TEST_KEY}
,'content-type': 'application/json'
},
};
This throws an error, and when I check it, I find axios is checking 'https://api.paystack.co/bank/resolve?account_number=${trxReference}&bank_code=${}` which us an entirely different url located in an entirely different controller logic, changing up the route doesn't work and i am at loss of what to do. I need a response as soon as possible please
Beta Was this translation helpful? Give feedback.
All reactions