MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / isUrlLoadError

Function isUrlLoadError

src/hooks/urlLoaderErrorHandling.ts:42–53  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

40}
41
42export function isUrlLoadError(error: unknown): error is UrlLoadError {
43 if (!isRecord(error)) {
44 return false;
45 }
46
47 return (
48 isUrlLoadErrorType(error.type) &&
49 typeof error.message === 'string' &&
50 isOptionalString(error.details) &&
51 isOptionalString(error.failedFile)
52 );
53}
54
55export function formatUrlLoadError(error: UrlLoadError): string {
56 return error.message + (error.details ? `: ${error.details}` : '');

Callers 4

fetchManifestColmapFilesFunction · 0.90
fetchSplatUrlFileFunction · 0.90
resolveUrlLoadErrorFunction · 0.85

Calls 3

isUrlLoadErrorTypeFunction · 0.85
isOptionalStringFunction · 0.85
isRecordFunction · 0.70

Tested by

no test coverage detected