Function: getUnknownErrorMessage()
getUnknownErrorMessage(
error:unknown,fallback?:string):string
Defined in: shared/utils/errorCatalog.ts:453
Derives a user-friendly message from an unknown error value.
Parametersโ
errorโ
unknown
fallback?โ
string = ERROR_CATALOG.system.UNKNOWN_ERROR
Returnsโ
string
Remarksโ
This helper replaces the legacy @shared/utils/errorUtils.getErrorMessage
implementation so that fallback strings come from the centralized
ERROR_CATALOG.
- When the supplied value is an ://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error instance, the underlying
messageproperty is returned. - All other values yield the provided fallback string.