method ErrorUtils.getErrorCode
ErrorUtils.getErrorCode(error: unknown): ErrorCode | undefined

Gets the error code if the error is a BaseError, otherwise returns undefined.

Parameters

error: unknown

Return Type

ErrorCode | undefined

Usage

import { ErrorUtils } from ".";