method ErrorUtils.getMessage
ErrorUtils.getMessage(error: unknown): string

Extracts error message from unknown error type. This is the standard way to get error messages - use this instead of inline checks.

Parameters

error: unknown
  • Unknown error value

Return Type

string

Error message string

Usage

import { ErrorUtils } from ".";