Sha256: 8d2a1560aff9d68fe4d12f1377dc77944b11c6cc6bd69e9514d0b8b10da498d1
Contents?: true
Size: 1.58 KB
Versions: 6
Compression:
Stored size: 1.58 KB
Contents
module Esplanade class Response class Error < Esplanade::Error; end class NotDocumented < Error def initialize(request:, status:) @method = request[:method] @path = request[:path] @raw_path = request[:raw_path] @status = status super(to_hash) end def to_hash { request: { method: @method, path: @path, raw_path: @raw_path }, status: @status } end end class BodyIsNotJson < Error def initialize(request:, status:, body:) @method = request[:method] @path = request[:path] @raw_path = request[:raw_path] @status = status @body = body super(to_hash) end def to_hash { request: { method: @method, path: @path, raw_path: @raw_path }, status: @status, body: @body } end end class Invalid < Error def initialize(request:, status:, body:, error:) @method = request[:method] @path = request[:path] @raw_path = request[:raw_path] @status = status @body = body @error = error super(to_hash) end def to_hash { request: { method: @method, path: @path, raw_path: @raw_path }, status: @status, body: @body, error: @error } end end end end
Version data entries
6 entries across 6 versions & 1 rubygems