{"record":{"id":"d3904f08d58db1b6","repo":"AlistGo/alist","slug":"failed-to-generate-source-sas-url-w","errorCode":null,"errorMessage":"failed to generate source SAS URL: %w","messagePattern":"failed to generate source SAS URL: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/azure_blob/util.go","lineNumber":212,"sourceCode":"func (d *AzureBlob) deleteFile(ctx context.Context, path string, isDir bool) error {\n\tblobClient := d.containerClient.NewBlobClient(path)\n\t_, err := blobClient.Delete(ctx, nil)\n\tif err != nil && !(isDir && isNotFoundError(err)) {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// copyFile copies a single blob from source path to destination path\nfunc (d *AzureBlob) copyFile(ctx context.Context, srcPath, dstPath string) error {\n\tsrcBlob := d.containerClient.NewBlobClient(srcPath)\n\tdstBlob := d.containerClient.NewBlobClient(dstPath)\n\n\t// Use configured expiration time for SAS URL\n\texpireDuration := time.Hour * time.Duration(d.SignURLExpire)\n\tsrcURL, err := srcBlob.GetSASURL(sas.BlobPermissions{Read: true}, time.Now().Add(expireDuration), nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to generate source SAS URL: %w\", err)\n\t}\n\n\t_, err = dstBlob.StartCopyFromURL(ctx, srcURL, nil)\n\treturn err\n\n}\n\n// createContainerIfNotExists - Create container if not exists\n// Clean up commented code\nfunc (d *AzureBlob) createContainerIfNotExists(ctx context.Context, containerName string) error {\n\tserviceClient := d.client.ServiceClient()\n\tcontainerClient := serviceClient.NewContainerClient(containerName)\n\n\tvar options = service.CreateContainerOptions{}\n\t_, err := containerClient.Create(ctx, &options)\n\tif err != nil {\n\t\tvar responseErr *azcore.ResponseError\n\t\tif errors.As(err, &responseErr) && responseErr.ErrorCode != \"ContainerAlreadyExists\" {","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/azure_blob/util.go#L194-L230","documentation":"Error \"failed to generate source SAS URL: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/azure_blob/util.go:212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}