{"record":{"id":"c816f1f3f273a152","repo":"thanos-io/thanos","slug":"validation-error","errorCode":null,"errorMessage":"validation error","messagePattern":"validation error","errorType":"error_code","errorClass":null,"httpStatus":400,"severity":"error","filePath":"pkg/receive/handler.go","lineNumber":95,"sourceCode":"\tlabelError   = \"error\"\n)\n\ntype ReplicationProtocol string\n\nconst (\n\tProtobufReplication  ReplicationProtocol = \"protobuf\"\n\tCapNProtoReplication ReplicationProtocol = \"capnproto\"\n)\n\nvar (\n\t// errConflict is returned whenever an operation fails due to any conflict-type error.\n\terrConflict = errors.New(\"conflict\")\n\n\terrBadReplica  = errors.New(\"request replica exceeds receiver replication factor\")\n\terrNotReady    = errors.New(\"target not ready\")\n\terrUnavailable = errors.New(\"target not available\")\n\n\terrValidation = errors.New(\"validation error\")\n)\n\ntype WriteableStoreAsyncClient interface {\n\tstorepb.WriteableStoreClient\n\tRemoteWriteAsync(context.Context, *storepb.WriteRequest, endpointReplica, []int, chan writeResponse, func(error))\n\t// TryRemoteWriteAsync submits the request without blocking. Returns false if the peer's\n\t// worker pool is at capacity; the caller should fall back to RemoteWriteAsync.\n\tTryRemoteWriteAsync(context.Context, *storepb.WriteRequest, endpointReplica, []int, chan writeResponse, func(error)) bool\n}\n\n// Options for the web Handler.\ntype Options struct {\n\tWriter                  *Writer\n\tListenAddress           string\n\tRegistry                *prometheus.Registry\n\tTenantHeader            string\n\tTenantField             string\n\tDefaultTenantID         string","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/receive/handler.go#L77-L113","documentation":"errValidation is the sentinel returned when a remote-write request fails content validation in the receive handler (e.g. invalid tenant label via IsTenantValid or malformed payload). The HTTP layer maps it to http.StatusBadRequest (handler.go:755); it also wraps the tenant validation failure at handler.go:1155.","triggerScenarios":"Thrown at pkg/receive/handler.go:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the client payload (labels, tenant header) causing validation failure.","Check the wrapped message for the specific invalid field.","Do not retry: 400-class errors are permanent for this request."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}