MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / classifyFetchErrorWithCloudContext

Function classifyFetchErrorWithCloudContext

src/utils/urlUtils.ts:259–275  ·  view source on GitHub ↗
(
  err: unknown,
  url?: string
)

Source from the content-addressed store, hash-verified

257 * Enhanced error classification with cloud provider-specific CORS messages.
258 */
259export function classifyFetchErrorWithCloudContext(
260 err: unknown,
261 url?: string
262): UrlLoadError {
263 const baseError = classifyFetchError(err, url);
264
265 // Enhance CORS errors with provider-specific instructions
266 if (baseError.type === 'cors' && url) {
267 const provider = detectCloudProvider(url);
268 if (provider) {
269 const instructions = getCorsInstructions(provider);
270 baseError.details = `This ${provider.toUpperCase()} bucket does not allow cross-origin requests.\n\n${instructions}`;
271 }
272 }
273
274 return baseError;
275}

Callers

nothing calls this directly

Calls 3

detectCloudProviderFunction · 0.90
getCorsInstructionsFunction · 0.90
classifyFetchErrorFunction · 0.85

Tested by

no test coverage detected