Skip to main content

core.iserror

Home > @medplum/core > isError

isError() function

Returns true if the input is an Error object. This should be replaced with Error.isError when it is more widely supported. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Error/isError

Signature:

export declare function isError(value: unknown): value is Error;

Parameters

Parameter

Type

Description

value

unknown

The candidate value.

Returns:

value is Error

True if the input is an Error object.