Sha256: 03a4eb976098e9758e85b6a354309e8df86a43ba82d3146ef85152a04b2b5782

Contents?: true

Size: 484 Bytes

Versions: 4

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true

module MinatoErrorHandler
  module Errors
    class ExternalError < MinatoErrorHandler::Errors::MinatoError
      attr_accessor :req, :res

      def initialize(req: nil, res: nil)
        @req = req
        @res = res
        super()
      end

      def message
        "A external error has occurred!"
      end

      def status_code
        503
      end

      def debug_details
        { request: req, response: res }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
minato_error_handler-0.1.10 lib/minato_error_handler/errors/external_error.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/minato_error_handler-0.1.9.pre.1/lib/minato_error_handler/errors/external_error.rb
minato_error_handler-0.1.9.pre.1 lib/minato_error_handler/errors/external_error.rb
minato_error_handler-0.1.8 lib/minato_error_handler/errors/external_error.rb