Sha256: 579987db004e1bf9da9db66f0cdadc679408a995dc7c524b3597a9cae19d7422

Contents?: true

Size: 463 Bytes

Versions: 3

Compression:

Stored size: 463 Bytes

Contents

#!/usr/bin/env ruby

require File.join(File.dirname(__FILE__),'s3_authenticator')

begin
  req = S3Lib.request(:put, "spatten_sample_bucket/sample_object", :body => "Wheee")
rescue S3Lib::S3ResponseError => e
  puts "Amazon Error Type: #{e.amazon_error_type}"
  puts "HTTP Status: #{e.status.join(',')}"
  puts "Response from Amazon: #{e.response}"
  puts "canonical string: #{e.s3requester.canonical_string}" if e.amazon_error_type == 'SignatureDoesNotMatch'
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
spatten-s3lib-0.0.1 lib/error_handling.rb
s3lib-0.1.1 lib/error_handling.rb
s3lib-0.1.0 lib/error_handling.rb