class Vox::HTTP::Error

Standard API errors for bad requests

Attributes

data[R]

@return [Hash<Symbol, Object>] The response object

trace[R]

@return [String, nil] The trace identifier this error originated from.

Public Class Methods

new(data, req_id = nil) click to toggle source

@!visibility private Create an error from an API response. @param data [Hash<Symbol, Object>] The error object from the API. @param req_id [String] The trace ID for the originating request.

Calls superclass method
# File lib/vox/http/error.rb, line 17
def initialize(data, req_id = nil)
  @data = data
  @trace = req_id
  super(data[:message])
end