Couldn't get response when Permanently Delete User API returns status 429 | Community
Skip to main content

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

  • September 8, 2022
  • 4 replies
  • 0 views

test12

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);
}

4 replies

Eric27
  • September 12, 2022
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!

test12
  • Author
  • September 13, 2022

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


Eric27
  • September 13, 2022
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!

福永大翔

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