Sha256: 7fef2e9863549e201be9e4402f8217c0855b850783f1843584081958ad24c97b

Contents?: true

Size: 402 Bytes

Versions: 3

Compression:

Stored size: 402 Bytes

Contents

module Html2Pdf
  module Rails
    class NetworkError < StandardError
    end

    class RequestError < StandardError
      attr_reader :response

      def initialize(response, msg = nil)
        msg ||= "html2pdf request failed and got HTTP status #{response.code}"
        super(msg)
        @response = response
      end
    end

    class ServiceUnavailableError < RequestError
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
html2pdf-rails-0.4.0 lib/html2pdf/rails/errors.rb
html2pdf-rails-0.3.1 lib/html2pdf/rails/errors.rb
html2pdf-rails-0.3.0 lib/html2pdf/rails/errors.rb