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

Function resolveUrlLoadError

src/hooks/urlLoaderErrorHandling.ts:59–67  ·  view source on GitHub ↗
(
  error: unknown,
  contextUrl?: string,
  classifyError: ClassifyUrlLoadError = classifyFetchErrorWithCloudContext
)

Source from the content-addressed store, hash-verified

57}
58
59export function resolveUrlLoadError(
60 error: unknown,
61 contextUrl?: string,
62 classifyError: ClassifyUrlLoadError = classifyFetchErrorWithCloudContext
63): UrlLoadError {
64 return isUrlLoadError(error)
65 ? error
66 : classifyError(error, contextUrl);
67}
68
69export function handleUrlLoadFailure(error: unknown, deps: HandleUrlLoadFailureDeps): UrlLoadError {
70 const errorLog = deps.errorLog ?? appLogger.error;

Callers 2

handleUrlLoadFailureFunction · 0.85

Calls 2

isUrlLoadErrorFunction · 0.85
classifyErrorFunction · 0.85

Tested by

no test coverage detected