Skip to content

Catch expired token or bad token error and print friendlier message #237

Description

@bw-intuit

Currently throws a stack trace:

# sd list -r
/Users/bweaver/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/excon-0.32.0/lib/excon/middlewares/expects.rb:6:in `response_call': Expected(200) <=> Actual(403 Forbidden) (Excon::Errors::Forbidden)
  response => #<Excon::Response:0x007fe87189e3b8 @data={:body=>"<?xml version=\"1.0\"?>\n<Response><Errors><Error><Code>ExpiredToken</Code><Message>The security token included in the request is expired</Message></Error></Errors><RequestID>50d0fc32-d2e1-479e-8926-d52a0869ea8a</RequestID></Response>", :headers=>{"Transfer-Encoding"=>"", "Date"=>"Wed, 20 Aug 2014 19:55:56 GMT", "Server"=>"Amazon SimpleDB"}, :status=>403, :remote_ip=>"205.251.235.213", :local_port=>59347, :local_address=>"172.28.164.21"}, @body="<?xml version=\"1.0\"?>\n<Response><Errors><Error><Code>ExpiredToken</Code><Message>The security token included in the request is expired</Message></Error></Errors><RequestID>50d0fc32-d2e1-479e-8926-d52a0869ea8a</RequestID></Response>", @headers={"Transfer-Encoding"=>"", "Date"=>"Wed, 20 Aug 2014 19:55:56 GMT", "Server"=>"Amazon SimpleDB"}, @status=403, @remote_ip="205.251.235.213", @local_port=59347, @local_address="172.28.164.21">

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions