qiita-rb icon indicating copy to clipboard operation
qiita-rb copied to clipboard

When server returns Bad Gateway (502) response throws Faraday::ParsingError error

Open sinsoku opened this issue 8 years ago • 0 comments

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>
'

sinsoku avatar Sep 08 '17 10:09 sinsoku