mapError

Functionin experimental@fastly/js-compute 4.0.0since 3.37.0View source
mapError(error: Error | string): Array<Error | string>

Get information about an error as a ready-to-print array. This includes the error name, message, and a call stack.

If --enable-stack-traces is specified during the build, the call stack will be mapped using source maps. If --enable-stack-traces is specified and --exclude-sources is not, this will also include a code dump of neighboring lines of user code.

Parameters

error: Error | string

The error to retrieve information about. If a string is provided, it is first converted to an Error.

Returns

Array<Error | string>