File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ def handle_response(status_code, body)
94
94
raise Error , "404 Not found (#{ @uri . path } )"
95
95
when 407
96
96
raise Error , "Proxy Authentication Required"
97
+ when 413
98
+ raise Error , "Payload Too Large > 10KB"
97
99
else
98
100
raise Error , "Unknown error (status code #{ status_code } ): #{ body } "
99
101
end
Original file line number Diff line number Diff line change 430
430
expect { call_api } . to raise_error ( Pusher ::Error , 'Proxy Authentication Required' )
431
431
end
432
432
433
+ it "should raise Pusher::Error if pusher returns 413" do
434
+ stub_request ( verb , @url_regexp ) . to_return ( { :status => 413 } )
435
+ expect { call_api } . to raise_error ( Pusher ::Error , 'Payload Too Large > 10KB' )
436
+ end
437
+
433
438
it "should raise Pusher::Error if pusher returns 500" do
434
439
stub_request ( verb , @url_regexp ) . to_return ( { :status => 500 , :body => "some error" } )
435
440
expect { call_api } . to raise_error ( Pusher ::Error , 'Unknown error (status code 500): some error' )
You can’t perform that action at this time.
0 commit comments