Handling rate-limiting in the browser with AP.request

Hi @dmorrow , @ibuchanan ,

We are using AP.request javascript API inside the browser. We recognized that in case of 429 http status response code, the xhr.getAllResponseHeaders() only returns “Content-Type” header. We need “retry-after” header so that we can handle rate limiting. Could you please change the Atlassian JS to include retry-after response header?

I suspect the below JS snippet.
Minized JS file: https://d1p4vui1uwo7gg.cloudfront.net/atl-vertigo--shard-jira-prod-eu-13--4--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/azc3hx/b/7/eb7f3487d276234a435d9809e70e418d/_/download/contextbatch/js/jira.webresources:util,jira.webresources:feature-flags,com.atlassian.plugins.atlassian-connect-plugin:jira-atlassian-connect-resources-v5,-jira.heritage.critical/batch.js?locale=en-US:formatted

3 Likes

@mehmetaydogdu,

Yes, we appreciate that you want your browser-side client to be a good citizen. I opened the request as an issue:

Please watch, vote, and comment as appropriate.

1 Like

Hi @ibuchanan ,

Thanks for the prompt action.
I can’t vote the request because the issue is not visible to me.

@mehmetaydogdu can you try to check if you can see it now?

Caterina

2 Likes

Yes I can see now.