{"record":{"id":"f963c0e272f066f6","repo":"AlistGo/alist","slug":"unexpected-token-t","errorCode":null,"errorMessage":"unexpected token %T","messagePattern":"unexpected token %T","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/webdav/xml.go","lineNumber":162,"sourceCode":"\tfor {\n\t\tt, err := next(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch t.(type) {\n\t\tcase ixml.EndElement:\n\t\t\tif len(*pn) == 0 {\n\t\t\t\treturn fmt.Errorf(\"%s must not be empty\", start.Name.Local)\n\t\t\t}\n\t\t\treturn nil\n\t\tcase ixml.StartElement:\n\t\t\tname := t.(ixml.StartElement).Name\n\t\t\tt, err = next(d)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif _, ok := t.(ixml.EndElement); !ok {\n\t\t\t\treturn fmt.Errorf(\"unexpected token %T\", t)\n\t\t\t}\n\t\t\t*pn = append(*pn, xml.Name(name))\n\t\t}\n\t}\n}\n\n// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propfind\ntype propfind struct {\n\tXMLName  ixml.Name     `xml:\"DAV: propfind\"`\n\tAllprop  *struct{}     `xml:\"DAV: allprop\"`\n\tPropname *struct{}     `xml:\"DAV: propname\"`\n\tProp     propfindProps `xml:\"DAV: prop\"`\n\tInclude  propfindProps `xml:\"DAV: include\"`\n}\n\nfunc readPropfind(r io.Reader) (pf propfind, status int, err error) {\n\tc := countingReader{r: r}\n\tif err = ixml.NewDecoder(&c).Decode(&pf); err != nil {","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/server/webdav/xml.go#L144-L180","documentation":"Error \"unexpected token %T\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at server/webdav/xml.go:162 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-15T22:17:37.221Z"}