( err: unknown, url?: string )
| 257 | * Enhanced error classification with cloud provider-specific CORS messages. |
| 258 | */ |
| 259 | export 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 | } |
nothing calls this directly
no test coverage detected