Class: Bandwidth::Error

Inherits:
Object
  • Object
show all
Extended by:
ClientWrapper
Defined in:
lib/bandwidth/error.rb

Overview

The User Errors resource lets you see information about errors that happened in your API calls and during applications callbacks.

Class Method Summary collapse

Methods included from ClientWrapper

wrap_client_arg

Class Method Details

.get(client, id) ⇒ Hash

Gets information about one user error

Examples:

err = Error.get(client, "id")

Parameters:

  • client (Client)

    optional client instance to make requests

  • id (String)

    if of error

Returns:

  • (Hash)

    error information



13
14
15
# File 'lib/bandwidth/error.rb', line 13

def self.get(client, id)
  client.make_request(:get, client.concat_user_path("#{ERROR_PATH}/#{id}"))[0]
end

.list(client, query = nil) ⇒ Array

Gets all the user errors for a user

Examples:

errors = Error.list(client)

Parameters:

  • client (Client)

    optional client instance to make requests

  • query (Hash) (defaults to: nil)

    query options

Returns:

  • (Array)

    list of errors



24
25
26
# File 'lib/bandwidth/error.rb', line 24

def self.list(client, query = nil)
  client.make_request(:get, client.concat_user_path(ERROR_PATH), query)[0]
end