LedeWire SDK API Reference
    Preparing search index...

    Class LedewireError

    Base error class for all LedeWire SDK errors. All errors thrown by the SDK are instances of this class, making it safe to use err instanceof LedewireError as a type guard.

    try {
    await client.purchases.create({ contentId: '...' })
    } catch (err) {
    if (err instanceof LedewireError) {
    console.error(err.statusCode, err.message)
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Parameters

      • message: string
      • statusCode: number
      • Optionalcode: number

      Returns LedewireError

    Properties

    code: number | undefined

    Machine-readable error code from the API error body, if present.

    statusCode: number

    HTTP status code returned by the API (e.g. 400, 401, 404, 422).