Permalink
Browse files

Include the path in 404 error message

  • Loading branch information...
mloughran committed Nov 12, 2012
1 parent f61f319 commit 6b1524f8bb01adb4b168d2cd2a4de455e83e48cb
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/pusher/request.rb
  2. +1 −1 spec/client_spec.rb
View
@@ -98,7 +98,7 @@ def handle_response(status_code, body)
when 401
raise AuthenticationError, body
when 404
- raise Error, "Resource not found: app_id is probably invalid"
+ raise Error, "404 Not found (#{@uri.path})"
when 407
raise Error, "Proxy Authentication Required"
else
View
@@ -289,7 +289,7 @@
it "should raise Pusher::Error if pusher returns 404" do
stub_request(verb, @url_regexp).to_return({:status => 404})
- lambda { call_api }.should raise_error(Pusher::Error, 'Resource not found: app_id is probably invalid')
+ lambda { call_api }.should raise_error(Pusher::Error, '404 Not found (/apps/20/path)')
end
it "should raise Pusher::Error if pusher returns 407" do

0 comments on commit 6b1524f

Please sign in to comment.