{"record":{"id":"4e2c20e074b402f9","repo":"zeromicro/go-zero","slug":"bad-config-for-signature","errorCode":null,"errorMessage":"bad config for Signature","messagePattern":"bad config for Signature","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rest/engine.go","lineNumber":27,"sourceCode":"\t\"time\"\n\n\t\"github.com/zeromicro/go-zero/core/codec\"\n\t\"github.com/zeromicro/go-zero/core/load\"\n\t\"github.com/zeromicro/go-zero/core/logc\"\n\t\"github.com/zeromicro/go-zero/core/stat\"\n\t\"github.com/zeromicro/go-zero/rest/chain\"\n\t\"github.com/zeromicro/go-zero/rest/handler\"\n\t\"github.com/zeromicro/go-zero/rest/httpx\"\n\t\"github.com/zeromicro/go-zero/rest/internal\"\n\t\"github.com/zeromicro/go-zero/rest/internal/header\"\n\t\"github.com/zeromicro/go-zero/rest/internal/response\"\n)\n\n// use 1000m to represent 100%\nconst topCpuUsage = 1000\n\n// ErrSignatureConfig is an error that indicates bad config for signature.\nvar ErrSignatureConfig = errors.New(\"bad config for Signature\")\n\ntype engine struct {\n\tconf   RestConf\n\troutes []featuredRoutes\n\t// timeout is the max timeout of all routes,\n\t// and is used to set http.Server.ReadTimeout and http.Server.WriteTimeout.\n\t// this network timeout is used to avoid DoS attacks by sending data slowly\n\t// or receiving data slowly with many connections to exhaust server resources.\n\ttimeout              time.Duration\n\tunauthorizedCallback handler.UnauthorizedCallback\n\tunsignedCallback     handler.UnsignedCallback\n\tchain                chain.Chain\n\tmiddlewares          []Middleware\n\tshedder              load.Shedder\n\tpriorityShedder      load.Shedder\n\ttlsConfig            *tls.Config\n}\n","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/zeromicro/go-zero/blob/11f21098ddd95a58f801920fea4f0543d4d01586/rest/engine.go#L9-L45","documentation":"Error \"bad config for Signature\" thrown in zeromicro/go-zero.","triggerScenarios":"Thrown at rest/engine.go:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"11f21098ddd95a58f801920fea4f0543d4d01586","analyzedAt":"2026-08-15T15:59:26.308Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}