{"id":"b10c87a10d78ac8f","repo":"jackc/pgx","slug":"authtype-not-recognized-d","errorCode":null,"errorMessage":"authType not recognized: %d","messagePattern":"authType not recognized: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgproto3/backend.go","lineNumber":285,"sourceCode":"//\t\t\tthe context.\n//\n// Since the Frontend does not know about the state of a backend, it is important\n// to call SetAuthType() after an authentication request is received by the Frontend.\nfunc (b *Backend) SetAuthType(authType uint32) error {\n\tswitch authType {\n\tcase AuthTypeOk,\n\t\tAuthTypeCleartextPassword,\n\t\tAuthTypeMD5Password,\n\t\tAuthTypeSCMCreds,\n\t\tAuthTypeGSS,\n\t\tAuthTypeGSSCont,\n\t\tAuthTypeSSPI,\n\t\tAuthTypeSASL,\n\t\tAuthTypeSASLContinue,\n\t\tAuthTypeSASLFinal:\n\t\tb.authType = authType\n\tdefault:\n\t\treturn fmt.Errorf(\"authType not recognized: %d\", authType)\n\t}\n\n\treturn nil\n}\n\n// SetMaxBodyLen sets the maximum length of a message body in octets.\n// If a message body exceeds this length, Receive will return an error.\n// This is useful for protecting against malicious clients that send\n// large messages with the intent of causing memory exhaustion.\n// The default value is 0.\n// If maxBodyLen is 0, then no maximum is enforced.\nfunc (b *Backend) SetMaxBodyLen(maxBodyLen int) {\n\tb.maxBodyLen = maxBodyLen\n}\n","sourceCodeStart":267,"sourceCodeEnd":300,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgproto3/backend.go#L267-L300","documentation":"Error \"authType not recognized: %d\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgproto3/backend.go:285 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","schemaVersion":2}