{"record":{"id":"a226527374a478cc","repo":"AlistGo/alist","slug":"failed-to-generate-sas-url-w","errorCode":null,"errorMessage":"failed to generate SAS URL: %w","messagePattern":"failed to generate SAS URL: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/azure_blob/driver.go","lineNumber":136,"sourceCode":"\t\t\t\tPath:     *blob.Name,\n\t\t\t\tSize:     *blob.Properties.ContentLength,\n\t\t\t\tModified: *blob.Properties.LastModified,\n\t\t\t\tCtime:    *blob.Properties.CreationTime,\n\t\t\t\tIsFolder: false,\n\t\t\t})\n\t\t}\n\t}\n\treturn objs, nil\n}\n\n// Link generates a temporary SAS URL for accessing a blob.\nfunc (d *AzureBlob) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error) {\n\tblobClient := d.containerClient.NewBlobClient(file.GetPath())\n\texpireDuration := time.Hour * time.Duration(d.SignURLExpire)\n\n\tsasURL, err := blobClient.GetSASURL(sas.BlobPermissions{Read: true}, time.Now().Add(expireDuration), nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to generate SAS URL: %w\", err)\n\t}\n\treturn &model.Link{URL: sasURL}, nil\n}\n\n// MakeDir creates a virtual directory by uploading an empty blob as a marker.\nfunc (d *AzureBlob) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error) {\n\tdirPath := path.Join(parentDir.GetPath(), dirName)\n\tif err := d.mkDir(ctx, dirPath); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create directory marker: %w\", err)\n\t}\n\n\treturn &model.Object{\n\t\tPath:     dirPath,\n\t\tName:     dirName,\n\t\tIsFolder: true,\n\t}, nil\n}\n","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/azure_blob/driver.go#L118-L154","documentation":"Error \"failed to generate SAS URL: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/azure_blob/driver.go:136 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"}