{"record":{"id":"4df38e8e926e8b86","repo":"AlistGo/alist","slug":"string-data-4df38e","errorCode":null,"errorMessage":"string(data)","messagePattern":"string\\(data\\)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/onedrive_app/util.go","lineNumber":198,"sourceCode":"\t\tres, err := base.HttpClient.Do(req)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// https://learn.microsoft.com/zh-cn/onedrive/developer/rest-api/api/driveitem_createuploadsession\n\t\tswitch {\n\t\tcase res.StatusCode >= 500 && res.StatusCode <= 504:\n\t\t\tretryCount++\n\t\t\tif retryCount > maxRetries {\n\t\t\t\tres.Body.Close()\n\t\t\t\treturn fmt.Errorf(\"upload failed after %d retries due to server errors, error %d\", maxRetries, res.StatusCode)\n\t\t\t}\n\t\t\tbackoff := time.Duration(1<<retryCount) * time.Second\n\t\t\tutils.Log.Warnf(\"[OnedriveAPP] server errors %d while uploading, retrying after %v...\", res.StatusCode, backoff)\n\t\t\ttime.Sleep(backoff)\n\t\tcase res.StatusCode != 201 && res.StatusCode != 202 && res.StatusCode != 200:\n\t\t\tdata, _ := io.ReadAll(res.Body)\n\t\t\tres.Body.Close()\n\t\t\treturn errors.New(string(data))\n\t\tdefault:\n\t\t\tres.Body.Close()\n\t\t\tretryCount = 0\n\t\t\tfinish += byteSize\n\t\t\tup(float64(finish) * 100 / float64(stream.GetSize()))\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":180,"sourceCodeEnd":208,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/onedrive_app/util.go#L180-L208","documentation":"Error \"string(data)\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/onedrive_app/util.go:198 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation."],"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-15T17:31:12.345Z"}