qiita-rb
qiita-rb copied to clipboard
When server returns Bad Gateway (502) response throws Faraday::ParsingError error
Because the API server returns HTML, so Faraday throws an error. :cry:
Faraday::ParsingError: 765: unexpected token at '<!DOCTYPE html>
<html>
<head>
<title>Bad Gateway (502)</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="description" content="Bad Gateway (502)"/>
<style type="text/css">
...
</script>
</body>
</html>
'