Represents a localizable error that can be reported back to the user. The actual error text that is displayed to the user should not be passed to the error in code. Use the errorId to tell the translation service which error this is. Optionally you can also pass in a debugError. DO NOT USE THIS CLASS FOR INTERNAL ERRORS SENT TO THE DEVELOPER!

Hierarchy (View Summary, Expand)

Constructors

  • Parameters

    • errorId: string
    • replacements: { [key: string]: string | string[] } = {}
    • httpStatusCode: number = 500
    • OptionaldebugMessage: string
    • OptionalclientErrorId: string

    Returns H5pError

Properties

cause?: unknown
clientErrorId?: string
debugMessage?: string
errorId: string
httpStatusCode: number = 500
message: string
name: string
replacements: { [key: string]: string | 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

MMNEPVFCICPMFPCPTTAAATR