{"record":{"id":"bffef297e3108565","repo":"AlistGo/alist","slug":"string-rsp","errorCode":null,"errorMessage":"string(rsp)","messagePattern":"string\\(rsp\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/vtencent/util.go","lineNumber":179,"sourceCode":"\t}\n\treturn resps, nil\n}\n\nfunc (d *Vtencent) CommitUploadUGC(signature string, vodSessionKey string) (RspCommitUploadUGC, error) {\n\tapi := \"https://vod2.qcloud.com/v3/index.php?Action=CommitUploadUGC\"\n\tform := base.Json{\n\t\t\"signature\":     signature,\n\t\t\"vodSessionKey\": vodSessionKey,\n\t}\n\tvar resps RspCommitUploadUGC\n\trsp, err := d.ugcRequest(api, http.MethodPost, func(req *resty.Request) {\n\t\treq.SetBody(form).ForceContentType(\"application/json\")\n\t}, &resps)\n\tif err != nil {\n\t\treturn RspCommitUploadUGC{}, err\n\t}\n\tif len(resps.Data.Video.URL) == 0 {\n\t\treturn RspCommitUploadUGC{}, errors.New(string(rsp))\n\t}\n\treturn resps, nil\n}\n\nfunc (d *Vtencent) FinishUploadMaterial(SummaryKey string, VodVerifyKey string, UploadContext, VodFileId string) (RspFinishUpload, error) {\n\tapi := \"https://api.vs.tencent.com/PaaS/Material/FinishUploadMaterial\"\n\tform := base.Json{\n\t\t\"UploadContext\": UploadContext,\n\t\t\"VodVerifyKey\":  VodVerifyKey,\n\t\t\"VodFileId\":     VodFileId,\n\t\t\"UploadFullKey\": SummaryKey}\n\tvar resps RspFinishUpload\n\trsp, err := d.request(api, http.MethodPost, func(req *resty.Request) {\n\t\treq.SetBody(form).ForceContentType(\"application/json\")\n\t}, &resps)\n\tif err != nil {\n\t\treturn RspFinishUpload{}, err\n\t}","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/vtencent/util.go#L161-L197","documentation":"After CommitUploadUGC (VOD UGC upload commit), the driver expects the response to contain Data.Video.URL; when that field is empty it returns the ENTIRE raw response body as the error text (errors.New(string(rsp))). This is the 'show me the payload' style of error: the server accepted the HTTP call but the commit did not produce a video URL, so the driver dumps the body for diagnosis.","triggerScenarios":"/PaaS/UgcUpload/CommitUploadUGC (via ugcRequest) returning 200-style JSON whose Data.Video.URL is empty/missing — expired vodSessionKey, file not fully uploaded (missing chunks), server-side transcode failure, or a changed response schema.","commonSituations":"Slow upstream causing the upload session to time out before commit; Retrying a commit with a stale vodSessionKey after a previous partial attempt; Tencent changing the commit response shape in a driver-untested region or API version","solutions":["Retry the upload from scratch: re-run ApplyUploadUGC to get a fresh session, upload all parts, then commit once","Verify the vtencent storage cookie/credentials are current before long uploads","Inspect the dumped body in the error/log — it usually contains the real ErrorCode/Message explaining why no URL was produced"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// before commit, confirm all parts are uploaded and session is fresh\nif vodSessionKey == \"\" || !allPartsUploaded {\n    return errors.New(\"upload incomplete — re-apply for a fresh session instead of committing\")\n}","typeGuard":null,"tryCatchPattern":"res, err := d.CommitUploadUGC(signature, vodSessionKey)\nif err != nil {\n    if strings.Contains(err.Error(), \"Video\") || isRawBodyError(err) {\n        // raw body surfaced: restart the whole UGC flow with a fresh ApplyUploadUGC\n        return restartUploadFlow(ctx, stream)\n    }\n    return err\n}","preventionTips":["Treat a commit-without-URL as 'restart the flow', not 'retry the commit'","Log the raw response body at error level for postmortem","Complete uploads promptly; do not hold upload sessions across long idle periods"],"tags":["vtencent","tencent-cloud","ugc-upload","upload","raw-response"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}