Skip to content

Minima.js API


Minima.js API / @minimajs/server / @minimajs/server / abort / is

Function: is()

ts
function is(error): error is BaseHttpError;

Defined in: packages/server/src/http.ts:214

Checks if a given error is an aborted error.

Parameters

error

unknown

The error to check

Returns

error is BaseHttpError

True if the error is a BaseHttpError

Example

ts
if (abort.is(error)) {
  console.log('Request was aborted');
}