{"record":{"id":"950d18c11fac62ef","repo":"JuliusBrussee/caveman","slug":"request-body-must-contain-one-json-value","errorCode":null,"errorMessage":"request body must contain one JSON value","messagePattern":"request body must contain one JSON value","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"shared/platform/httpx/httpx.go","lineNumber":89,"sourceCode":"\t\treturn \"Service temporarily unavailable.\"\n\tcase http.StatusGatewayTimeout:\n\t\treturn \"Upstream service timed out.\"\n\tdefault:\n\t\treturn \"Internal server error.\"\n\t}\n}\n\nfunc DecodeJSON(r *http.Request, dst any, maxBytes int64) error {\n\tdefer r.Body.Close()\n\treader := http.MaxBytesReader(nil, r.Body, maxBytes)\n\tdec := json.NewDecoder(reader)\n\tdec.DisallowUnknownFields()\n\tif err := dec.Decode(dst); err != nil {\n\t\treturn err\n\t}\n\tif err := dec.Decode(&struct{}{}); !errors.Is(err, io.EOF) {\n\t\tif err == nil {\n\t\t\treturn errors.New(\"request body must contain one JSON value\")\n\t\t}\n\t\treturn err\n\t}\n\treturn nil\n}\n","sourceCodeStart":71,"sourceCodeEnd":95,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/httpx/httpx.go#L71-L95","documentation":"Error \"request body must contain one JSON value\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/httpx/httpx.go:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send exactly one JSON value in the request body."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}