Sha256: 42f08b99d2e22d8780db84462489a4c525bf986c7b15c84ba21f01497ef39857

Contents?: true

Size: 482 Bytes

Versions: 7

Compression:

Stored size: 482 Bytes

Contents

# frozen_string_literal: true

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

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

      def message
        "A network error has occurred!"
      end

      def status_code
        503
      end

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
minato_error_handler-0.1.7 lib/minato_error_handler/errors/network_error.rb
minato_error_handler-0.1.6 lib/minato_error_handler/errors/network_error.rb
minato_error_handler-0.1.5 lib/minato_error_handler/errors/network_error.rb
minato_error_handler-0.1.4 lib/minato_error_handler/errors/network_error.rb
minato_error_handler-0.1.3 lib/minato_error_handler/errors/network_error.rb
minato_error_handler-0.1.2.pre.9 lib/minato_error_handler/errors/network_error.rb
minato_error_handler-0.1.2.pre.8 lib/minato_error_handler/errors/network_error.rb