[Groonga-commit] ranguba/ranguba-crawler at e1cfde6 [master] Show response on client error

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Mar 1 23:48:23 JST 2017


Kouhei Sutou	2017-03-01 23:48:23 +0900 (Wed, 01 Mar 2017)

  New Revision: e1cfde6f3bbf93f9ad349e32627ca479d5612abd
  https://github.com/ranguba/ranguba-crawler/commit/e1cfde6f3bbf93f9ad349e32627ca479d5612abd

  Message:
    Show response on client error

  Modified files:
    lib/ranguba-crawler/command.rb

  Modified: lib/ranguba-crawler/command.rb (+4 -0)
===================================================================
--- lib/ranguba-crawler/command.rb    2017-03-01 23:13:49 +0900 (f5e1454)
+++ lib/ranguba-crawler/command.rb    2017-03-01 23:48:23 +0900 (c04cad4)
@@ -49,6 +49,10 @@ module RangubaCrawler
           case response
           when Net::HTTPSuccess
             # pp(JSON.parse(response.body))
+          when Net::HTTPClientError
+            puts("Failed to request: #{response.code}")
+            puts(path)
+            pp(JSON.parse(response.body))
           else
             puts("Failed to request: #{response.code}")
             puts(path)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index