EdgeAIG's picture
download
raw
273 Bytes
export function getErrorMessage(error: unknown | undefined) {
if (error == null) {
return 'unknown error';
}
if (typeof error === 'string') {
return error;
}
if (error instanceof Error) {
return error.message;
}
return JSON.stringify(error);
}

Xet Storage Details

Size:
273 Bytes
·
Xet hash:
2eafbac44116c976dba3f37a83551f4cc3e6e389bb8707e486d1d0a1334f2758

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.