Couldn't get response when Permanently Delete User API returns status 429
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);
}
-
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!
-
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,
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
Please sign in to leave a comment.
3 Comments