Home > @wixc3/common > getErrorCode
Returns error.code property if the error object has it, otherwise returns undefined.
Signature:
export declare function getErrorCode(error: Error & {
code?: string;
}): string | undefined;
Parameter | Type | Description |
---|---|---|
error | Error & { code?: string; } |
Returns:
string | undefined