Couldn't get response when Permanently Delete User API returns status 429



Publicado 08 de set. de 2022

Permanently Delete User endpoint doesn't return response in my App.

Once API call hit rate limit which is 700 call per 10 mins, there is error in console.

However the App couldn't get responses nor any errors.

Does anyone has any ideas to deal with status 429 errors in Apps?

This error happens only when the app runs simultaneously by several users.

This is rare case though, I'd like to show "Too many request" error message on UI at least.

Thank you in advance.

 

Here is source code which has a problem.

var options = {
    url: '/api/v2/deleted_users/' + userId,
    type: 'DELETE',
    dataType: 'json',
    contentType: 'application/json',
};

try {
  return client.request(options).then(
    function (data) {
      console.error(data);
      return data;
    },
    function (error) {
      console.error(error);
      return error;
    }
  );
} catch (e) {
  console.error(e);
}

0

4

4 comentários

Hi Eric,
My team is also facing the same issue.
If you know the results of the investigation, please let us know.

0


Hey Tokugawa,

That's very odd, I'm going to dig into this to see why the rate limit headers aren't being exposed via ZAF. I'll touch base with my findings tomorrow.

Thanks!

1


Hi Eric,

Thank you for your suggestion.

Even though I added the httpCompleteResponse parameter, response header doesn't include X-Rate-Limit nor X-Rate-Limit-Remaining.

Do you have any idea about this problem?

 

Source code

var options = {
    url: '/api/v2/deleted_users/' + userId,
    type: 'DELETE',
    dataType: 'json',
    contentType: 'application/json',
  httpCompleteResponse: true
};

Response

0


Hey Tokugawa,

Your best bet would to implement queuing when you're getting close to hitting the rate limit instead of waiting to hit it. I'd suggest taking a look at our best practices for rate limiting.

Thanks!

1


Entrar para comentar.

Não encontrou o que estava procurando?

Nova publicação