If a plugin encounters a fatal error and verified-fetch should not continue processing the request, it should throw an instance of this class.

Note that you should be very careful when throwing a PluginFatalError, as it will stop the request from being processed further. If you do not have a response to return to the client, you should consider throwing a PluginError instead.

Hierarchy (view full)

Constructors

Properties

cause?: unknown
code: string
details?: Record<string, any>
fatal: boolean
message: string
name: string = 'PluginFatalError'
response?: any
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      Returns any

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void