Sha256: 20633ddfc6f1a0889636a8f47f7b3316f601c325af6a03df7cbbafbecfafa7bd

Contents?: true

Size: 464 Bytes

Versions: 8

Compression:

Stored size: 464 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2023, by Samuel Williams.

module Async
	module REST
		class Error < StandardError
		end
		
		class RequestError < Error
		end
		
		class UnsupportedError < Error
		end
		
		class ResponseError < Error
			def initialize(response)
				super(response.read)
				
				@response = response
			end
			
			def to_s
				"#{@response}: #{super}"
			end
			
			attr :response
		end
	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
async-rest-0.19.1 lib/async/rest/error.rb
async-rest-0.19.0 lib/async/rest/error.rb
async-rest-0.18.0 lib/async/rest/error.rb
async-rest-0.17.0 lib/async/rest/error.rb
async-rest-0.16.0 lib/async/rest/error.rb
async-rest-0.15.0 lib/async/rest/error.rb
async-rest-0.14.0 lib/async/rest/error.rb
async-rest-0.13.0 lib/async/rest/error.rb