Exception: Blockchain0x::APIKeyError

Inherits:
Error
  • Object
show all
Defined in:
lib/blockchain0x/errors.rb

Overview

Subclass for HTTP 401 / 403 envelopes whose ‘error.code` starts with `apikey.`. Catch this to handle apikey-related failures:

begin
  client.api_keys.list
rescue Blockchain0x::APIKeyError => e
  if e.code == 'apikey.scope_insufficient'
    # mint a fresh key with more scope
  end
end

Instance Attribute Summary

Attributes inherited from Error

#code, #http_status, #request_id

Method Summary

Methods inherited from Error

#initialize

Constructor Details

This class inherits a constructor from Blockchain0x::Error