API is unavailable
Hello there! 👋🏻
Describe the bug
I'm one of the maintainers of the Shields project (happy to see that you use our badges on your README!), and I recently noticed that our badges integrating with the bit.dev API have been broken since roughly May 3rd (see https://github.com/badges/shields/issues/6476 for more details). Running our test suite locally with trace output enabled shows that your API is returning a 503 error response, with a HTML payload corresponding to one of those automated Cloudfare browser checks:
< HTTP/1.1 503 Service Temporarily Unavailable
< Date: Thu, 13 May 2021 19:45:01 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: close
< X-Frame-Options: SAMEORIGIN
< Permissions-Policy: accelerometer=(),autoplay=(),camera=(),clipboard-read=(),clipboard-write=(),fullscreen=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()
< Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Expires: Thu, 01 Jan 1970 00:00:01 GMT
< cf-request-id: 0a08dbe2bf0000067eaca14000000001
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< Server: cloudflare
< CF-RAY: 64ee627dfabb067e-LHR
< alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
<
<!DOCTYPE HTML>
...
<h1><span data-translate="checking_browser">Checking your browser before accessing</span> bit.dev.</h1>
<div id="no-cookie-warning" class="cookie-warning" data-translate="turn_on_cookies" style="display:none">
<p data-translate="turn_on_cookies" style="color:#bd2426;">Please enable Cookies and reload the page.</p>
</div>
<p data-translate="process_is_automatic">This process is automatic. Your browser will redirect to your requested content shortly.</p>
<p data-translate="allow_5_secs" id="cf-spinner-allow-5-secs" >Please allow up to 5 seconds…</p>
<p data-translate="redirecting" id="cf-spinner-redirecting" style="display:none">Redirecting…</p>
</div>
...
</html>
Interestingly, when calling the API directly from a Firefox tab, I do not get any of those browser checks. Is your CDN misconfigured?
Steps to Reproduce
The issue is also reproducible in a terminal by running the following cURL command:
curl https://api.bit.dev/scope/ramda/ramda -H "Accept: application/json"
Expected Behavior
Calling the API should return a valid JSON response.
@PyvesB Hi, It was firewall issue, now it's working well, sorry for that :)
Thank you, I can confirm things are working as expected again. 👍🏻
Hello @guysaar223 👋🏻
Looks like the API had been failing again. This time around, I'm seeing 423 response codes coming back. Could you please advise?
@PyvesB Hi, its legacy API, we will create a new API and update it, Guy
@GiladShoham