DEV Community

Preeti Nair
Preeti Nair

Posted on

Facing 429 status code error response issue in next js application

Hi,
I am using a Nextjs React application with Nextjs version 9.2.0 & React version 16.8.6.

Issue: I am calling an api to resend email verification and when a user tries for more than 4 times to resend email, cloudflare will throw 429 status code in http header. The problem which i am facing is i am not getting any error response with status code 429.
I am using axios's interceptors to get the response
eg: instance.interceptors.response.use(function (response) {
// Do something with response data
return response.data;
}, function (error) {
//getting error as undefined
});

where instance = axios.create({ });

Could you please suggest a possible solution?

Top comments (0)