Sha256: 5c52823cc5520b801f00e810c6de9391986c99539cf0105ddd5f38eb870edf72

Contents?: true

Size: 316 Bytes

Versions: 7

Compression:

Stored size: 316 Bytes

Contents

module JellyfishAws
  class ApplicationController < ::ApplicationController
    rescue_from Fog::Compute::AWS::Error, with: :aws_error

    protected

    def aws_error(ex)
      message, type = ex.message.split(' => ').reverse
      render json: {type: type, error: message}, status: :bad_request
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jellyfish-aws-0.0.8 app/controllers/jellyfish_aws/application_controller.rb
jellyfish-aws-0.0.6 app/controllers/jellyfish_aws/application_controller.rb
jellyfish-aws-0.0.5 app/controllers/jellyfish_aws/application_controller.rb
jellyfish-aws-0.0.4 app/controllers/jellyfish_aws/application_controller.rb
jellyfish-aws-0.0.3 app/controllers/jellyfish_aws/application_controller.rb
jellyfish-aws-0.0.2 app/controllers/jellyfish_aws/application_controller.rb
jellyfish-aws-0.0.1 app/controllers/jellyfish_aws/application_controller.rb