Sha256: 7d49a0eae94dddd683d08557494dbca8aee5fb6d7e16756482d3125c93ce4ceb

Contents?: true

Size: 456 Bytes

Versions: 13

Compression:

Stored size: 456 Bytes

Contents

module PipeRpc
  class Hub::Request
    class ErrorResult
      def initialize(request, error)
        @request, @error = request, Error.new(error)
      end

      def value
        @error.error
      end

      def to_response
        ErrorResponse.new(id: @request.id, error: { code: @error.code, data: { message: @error.message,
            backtrace: @error.backtrace, method: @request.method, args: @request.arguments } })
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pipe_rpc-2.5.0 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-2.4.0 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-2.3.0 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-2.2.3 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-2.2.2 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-2.2.1 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-2.2.0 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-2.1.0 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-2.0.0 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-1.1.2 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-1.1.1 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-1.1.0 lib/pipe_rpc/hub_request_error_result.rb
pipe_rpc-1.0.0 lib/pipe_rpc/hub_request_error_result.rb