{"record":{"id":"43de0752f3773768","repo":"hyperledger/fabric","slug":"bad-message-s","errorCode":null,"errorMessage":"bad message: %s","messagePattern":"bad message: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/etcdraft/chain.go","lineNumber":927,"sourceCode":"\tc.raftMetadataLock.Unlock()\n\n\tc.support.WriteBlock(block, m)\n}\n\n// Orders the envelope in the `msg` content. SubmitRequest.\n// Returns\n//\n//\t-- batches [][]*common.Envelope; the batches cut,\n//\t-- pending bool; if there are envelopes pending to be ordered,\n//\t-- err error; the error encountered, if any.\n//\n// It takes care of config messages as well as the revalidation of messages if the config sequence has advanced.\nfunc (c *Chain) ordered(msg *orderer.SubmitRequest) (batches [][]*common.Envelope, pending bool, err error) {\n\tseq := c.support.Sequence()\n\n\tisconfig, err := c.isConfig(msg.GetPayload())\n\tif err != nil {\n\t\treturn nil, false, errors.Errorf(\"bad message: %s\", err)\n\t}\n\n\tif isconfig {\n\t\t// ConfigMsg\n\t\tif msg.GetLastValidationSeq() < seq {\n\t\t\tc.logger.Warnf(\"Config message was validated against %d, although current config seq has advanced (%d)\", msg.GetLastValidationSeq(), seq)\n\t\t\tmsg.Payload, _, err = c.support.ProcessConfigMsg(msg.GetPayload())\n\t\t\tif err != nil {\n\t\t\t\tc.Metrics.ProposalFailures.Add(1)\n\t\t\t\treturn nil, true, errors.Errorf(\"bad config message: %s\", err)\n\t\t\t}\n\t\t}\n\n\t\tif c.checkForEvictionNCertRotation(msg.GetPayload()) {\n\n\t\t\tif !atomic.CompareAndSwapUint32(&c.leadershipTransferInProgress, 0, 1) {\n\t\t\t\tc.logger.Warnf(\"A reconfiguration transaction is already in progress, ignoring a subsequent transaction\")\n\t\t\t\treturn","sourceCodeStart":909,"sourceCodeEnd":945,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/etcdraft/chain.go#L909-L945","documentation":"Returned by Chain.ordered when the submitted message cannot be classified as a normal or config transaction — c.isConfig failed to process the payload. The inner error explains why the envelope was rejected (invalid structure, failed validation, unreadable channel header).","triggerScenarios":"Submitting an envelope whose payload cannot be processed by the message validation path — malformed envelope, wrong channel, invalid marshaled Payload, or a ProcessNormalMsg/ProcessConfigMsg error during classification.","commonSituations":"Client SDK building envelopes with the wrong proto structure; sending a transaction to the wrong channel; corrupted or hand-crafted envelopes; SDK/client version incompatibility with the channel's config format.","solutions":["Read the wrapped inner error (%s) to see the exact validation failure.","Regenerate the transaction with a supported SDK and correct channel name.","Validate the envelope with 'configtxlator proto_decode' or peer sign/verify tooling.","Ensure the client targets a channel this orderer actually serves."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"var timeoutErr *OrdererTimeoutError\nif errors.As(err, &timeoutErr) || strings.Contains(err.Error(), \"timed out\") {\n    return submitWithBackoff(req)\n}","preventionTips":["Size RPCTimeout for your network RTT.","Keep orderer-to-orderer latency low.","Load-balance submits across orderers.","Alert on leader resource saturation."],"tags":["hyperledger-fabric","etcdraft","validation","bad-message"],"backgroundTag":"bad-message","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}