Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

429 too many request on a single search request #250

Open
dragouf opened this issue May 14, 2020 · 0 comments
Open

429 too many request on a single search request #250

dragouf opened this issue May 14, 2020 · 0 comments

Comments

@dragouf
Copy link

dragouf commented May 14, 2020

when doing a simple search I get 429 response from jira but it works with curl. Here is what I do

let jira = new JiraClient({
  host: 'xxx.atlassian.net',
  basic_auth: {
    email: '[email protected]',
    api_token: 'xxxxxxxxxxxxxxx'
  }
});
const jql = "status = "In Progress" ORDER BY updated DESC";
return jira.search.search({jql}).catch(error => console.error(error));

I get this response:

[]({"statusCode":429,"body":"<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><title>Oops - an error has occurred</title><link type='text/css' rel='stylesheet' href='/static-assets/metal-all.css' media='all'><script src='/static-assets/metal-all.js'></script><!--[if lt IE 9]><link type='text/css' rel='stylesheet' href='/static-assets/metal-all-ie.css' media='all'><script src='/static-assets/metal-all-ie.js'></script><![endif]--><!--[if IE 9]><link type='text/css' rel='stylesheet' href='/static-assets/metal-all-ie9.css' media='all'><![endif]--><meta name=\"decorator\" content=\"none\" /></head><body class=\" error-page error429\"><script type=\"text/javascript\">document.body.className += \" js-enabled\";</script><div id=\"page\"><header id=\"header\" role=\"banner\"></header><!-- #header --><section id=\"content\" role=\"main\"><div class=\"aui-page-panel\"><div class=\"aui-page-panel-inner\"><section class=\"aui-page-panel-content lowerContent\"><div id=\"error-state\"><span class=\"error-type\"></span><h1>Something went wrong</h1><p>Try reloading the page, then check our <a href=\"https://status.atlassian.com\">Statuspage</a> for any current outages. If there are no relevant outages, create a <a href=\"https://support.atlassian.com/contact/\">support request</a> so we can help you out.</p><p>If you create a request, include the following so we can help you as fast as possible:</p><ul><li>Error type: <strong>429 - Too many requests</strong></li><li>Log reference: <strong>xxxxx </strong></li></ul></div></section><!-- .aui-page-panel-content --></div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel --></section><!-- #content --><footer id=\"footer\" role=\"contentinfo\"><section class=\"footer-body\"><div id=\"footer-logo\"><a href=\"http://www.atlassian.com/\" rel=\"nofollow\">Atlassian</a></div></section></footer><!-- #footer --></div><!-- #page --></body></html>","headers":{"server":"AtlassianProxy/1.15.8.1","vary":"Accept-Encoding","content-type":"text/html;charset=ISO-8859-1","strict-transport-security":"max-age=315360000; includeSubDomains; preload","date":"Thu, 14 May 2020 09:11:03 GMT","atl-traceid":"be879975cde5d0f0","x-xss-protection":"1; mode=block","x-content-type-options":"nosniff","micros-issuer":"micros/edge-authenticator, micros/edge-authenticator","connection":"close","expect-ct":"report-uri=\"https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy\", enforce, max-age=86400","content-length":"1922"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"xxx.atlassian.net","port":443,"hostname":"xxx.atlassian.net","hash":null,"search":null,"query":null,"pathname":"/rest/api/2/search","path":"/rest/api/2/search","href":"https://xxx.atlassian.net/rest/api/2/search"},"method":"POST","headers":{"Content-Type":"application/json","authorization":"Basic xxxxxxxxx","accept":"application/json","content-length":123}}})

here is the equivalent with curl

curl -D- -u [email protected] -X GET -H "Content-Type: application/json" https://xxx.atlassian.net/rest/api/2/search?jql=status%20%3D%20%22In%20Progress%22%20ORDER%20BY%20updated%20DESC

It was working before, I tried to update to last lib version but still the same error. Any idea ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant