API Docs for version 1.2.6002

Error

Module: Circuit

Summary

A Circuit error object derived from the JavaScript error object.

Constructor

Error

Syntax

Error

(
  • code
  • err
)

Summary

Parameters:

  • code String

    Error code

  • err String | Object

    The error message, or a detailed error object.

Item Index

Methods

Properties

Methods

setLogger

Syntax

setLogger

(
  • appLogger
)
Void

Summary

Set logger to be used by Node.js SDK. Not applicable to JS SDK.

Parameters:

  • appLogger Object

    logger object implementing 'debug', 'info', 'warn', 'warning' and 'error' functions

Returns:

Void:

Example:

Circuit.setLogger(bunyan.createLogger({
  name: 'sdk',
  stream: process.stdout,
  level: 'debug'
}));

Properties

code

Syntax

code

String

Summary

Error code as defined in Circuit.Constants.ReturnCode or Circuit.Constants.ErrorCode. E.g. UNEXPECTED_ERROR

errObj

Syntax

errObj

Object

Summary

Detailed error object containing detailed information that can be used when debugging. The object is different depending on the type of error.

message

Syntax

message

String

Summary

Error message