{"record":{"id":"f223bd7013bcb100","repo":"jackc/pgx","slug":"unknown-message-type-c-f223bd","errorCode":null,"errorMessage":"unknown message type: %c","messagePattern":"unknown message type: %c","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgproto3/frontend.go","lineNumber":394,"sourceCode":"\t\t}\n\tcase 's':\n\t\tmsg = &f.portalSuspended\n\tcase 'S':\n\t\tmsg = &f.parameterStatus\n\tcase 't':\n\t\tmsg = &f.parameterDescription\n\tcase 'T':\n\t\tmsg = &f.rowDescription\n\tcase 'V':\n\t\tmsg = &f.functionCallResponse\n\tcase 'W':\n\t\tmsg = &f.copyBothResponse\n\tcase 'Z':\n\t\tmsg = &f.readyForQuery\n\tcase 'v':\n\t\tmsg = &f.negotiateProtocolVersion\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown message type: %c\", f.msgType)\n\t}\n\n\terr = msg.Decode(msgBody)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif f.tracer != nil {\n\t\tf.tracer.traceMessage('B', int32(5+len(msgBody)), msg)\n\t}\n\n\treturn msg, nil\n}\n\n// Authentication message type constants.\n// See src/include/libpq/pqcomm.h for all\n// constants.\nconst (","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgproto3/frontend.go#L376-L412","documentation":"The frontend received a message from the server with a type byte not defined in the PostgreSQL protocol. The %c shows the unknown type character. Likely a non-PostgreSQL server or corrupted stream.","triggerScenarios":"Thrown at pgproto3/frontend.go:394 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm you are connecting to a PostgreSQL server","Check port number — connecting to a non-PostgreSQL service produces this","Inspect for middleboxes altering traffic","Reconnect to rule out transient corruption"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}