Represents an error related to provisioning issues.

This class extends ESPBaseError and is used to handle errors that occur during the provisioning process, such as device setup or user-device association.

Hierarchy (View Summary)

Constructors

  • Creates an instance of ESPProvError.

    Parameters

    • code:
          | "MISSING_NODE_ID"
          | "MISSING_PROV_ADAPTER"
          | "MISSING_ID_TOKEN"
          | "FAILED_PROV"
          | "FAILED_USER_DEVICE_ASSOCIATION"
          | "FAILED_USER_NODE_MAPPING_REQUEST_CREATION"
          | "FAILED_USER_NODE_MAPPING_CLOUD_TIMEOUT"
          | "INVALID_PROVISION_TYPE"
          | "INVALID_MAPPING_RESPONSE"
          | "INVALID_CHALLENGE_RESPONSE_FORMAT"
          | "VERIFY_NODE_MAPPING_FAILED"
          | "SET_NETWORK_CREDENTIALS_FAILED"
          | "CHALLENGE_RESPONSE_NOT_SUPPORTED"

      The error code corresponding to a specific provisioning error message from provErrorMessages.

    Returns ESPProvError

Properties

cause?: unknown
code: string

The specific error code associated with the error.

label: string

A label to classify the error type.

message: string
name: string
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void