question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad Gateway errors

See original GitHub issue

Hello & thanks for this fantastic service!

I’ve recently been getting more and more 502 Bad Gateway errors from badgen.net. I use badgen for the badges of cljdoc.org where I provide a static URL that people can put into their READMEs, e.g. https://cljdoc.org/badge/nrepl/nrepl.

The error page links to this https://vercel.com/docs/error/application/NO_RESPONSE_FROM_FUNCTION

To do this I’m requesting the badge from a server and then respond to the request with the body that badgen provided and some extra caching directives, the code can be found here (Clojure)

My question is:

  • Do you have any idea why I might be seeing those 502 errors?
  • Should I be calling the badgen API in any different way?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
wopiancommented, Jun 14, 2020

Was going to open an issue to gracefully handle 5xx responses from API providers (in this case David DM).

When these APIs return 5xx, the badge endpoint returns a HTML error page instead of a SVG which results in the following with this (https://flat.badgen.net/david/dev/wopian/kitsu) badge endpoint.

image

Ideally it would show something akin to

1reaction
martinklepschcommented, May 31, 2020

I made some changes to get better reporting and will report back. All the URLs include the string “cljdoc” if that’s helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Simple Explanation of a 502 Bad Gateway Error & How to ...
A 502 Bad Gateway Error is a general indicator that there's something wrong with a website's server communication. Since it's just a generic ......
Read more >
What is a 502 Bad Gateway Error (And How Can I Fix It)?
A 502 Bad Gateway Error means the website you're connected to tried to relay information from another server and encountered an error.
Read more >
502 Bad Gateway Error: What It Is and How to Fix It - Lifewire
The 502 Bad Gateway error is an HTTP status code that means that one server on the internet received an invalid response from...
Read more >
502 Bad Gateway - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 502 Bad Gateway server error response code indicates that the server, while acting as a gateway or ...
Read more >
How To Fix a 502 Bad Gateway Error - Kinsta
The 502 (Bad Gateway) status code indicates that the server, while acting as a gateway or proxy, received an invalid response from an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found