{"id":"3f046719abcf283a","repo":"go-redis/redis","slug":"invalid-notification-format","errorCode":null,"errorMessage":"invalid notification format","messagePattern":"invalid notification format","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"maintnotifications/errors.go","lineNumber":41,"sourceCode":"\tErrInvalidHandoffRetries = errors.New(logs.InvalidHandoffRetriesError())\n)\n\n// Integration errors\nvar (\n\t// ErrInvalidClient is returned when the client does not support push notifications\n\tErrInvalidClient = errors.New(logs.InvalidClientError())\n)\n\n// Handoff errors\nvar (\n\t// ErrHandoffQueueFull is returned when the handoff queue is full\n\tErrHandoffQueueFull = errors.New(logs.HandoffQueueFullError())\n)\n\n// Notification errors\nvar (\n\t// ErrInvalidNotification is returned when a notification is in an invalid format\n\tErrInvalidNotification = errors.New(logs.InvalidNotificationError())\n)\n\n// connection handoff errors\nvar (\n\t// ErrConnectionMarkedForHandoff is returned when a connection is marked for handoff\n\t// and should not be used until the handoff is complete\n\tErrConnectionMarkedForHandoff = errors.New(logs.ConnectionMarkedForHandoffErrorMessage)\n\t// ErrConnectionMarkedForHandoffWithState is returned when a connection is marked for handoff\n\t// and should not be used until the handoff is complete\n\tErrConnectionMarkedForHandoffWithState = errors.New(logs.ConnectionMarkedForHandoffErrorMessage + \" with state\")\n\t// ErrConnectionInvalidHandoffState is returned when a connection is in an invalid state for handoff\n\tErrConnectionInvalidHandoffState = errors.New(logs.ConnectionInvalidHandoffStateErrorMessage)\n)\n\n// shutdown errors\nvar (\n\t// ErrShutdown is returned when the maintnotifications manager is shutdown\n\tErrShutdown = errors.New(logs.ShutdownError())","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/maintnotifications/errors.go#L23-L59","documentation":"Returned by the push notification handler (push_notification_handler.go:26,32,82,...) when an incoming maintenance push notification is malformed — e.g. empty notification array, non-string notification type, wrong field types/counts in a MOVING/MIGRATING frame. It indicates the RESP3 push payload did not match the expected schema for that notification type.","triggerScenarios":"A RESP3 push frame arrives whose contents fail schema validation: MOVING with <3 fields, a non-int64 seqID/timeS, a non-string endpoint, or a nil handler-context connection. Each guard in the handler returns ErrInvalidNotification and logs the offending payload via logs.InvalidNotification*.","commonSituations":"Server/client version skew where the server emits a notification shape the client doesn't expect; a proxy or RESP-interceptor mangling push frames; a Redis fork emitting non-standard maintenance notifications; testing with hand-crafted push payloads that omit required fields.","solutions":["Check server and client versions match on the MOVING/MIGRATING/SMIGRATING schema (see AGENTS.md maintnotifications spec).","Inspect the logged payload (logged at the InvalidNotification* call sites) to see which field is wrong.","If a proxy is in the path, verify it forwards RESP3 push frames unmodified.","Upgrade go-redis / Redis to compatible versions; this is almost always a version or protocol-translation mismatch, not a client bug."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if errors.Is(err, maintnotifications.ErrInvalidNotification) {\n    // server sent a malformed maintenance push frame. \n    // Check version compatibility / proxy passthrough; not actionable per-command.\n    log.Debug(\"ignoring malformed maint notification: %v\", err)\n}","preventionTips":["Keep Redis server and go-redis on compatible versions.","Ensure any RESP proxy forwards push frames unmodified.","Capture logged payloads to diagnose schema skew."],"tags":["maintnotifications","push","resp3","notification","runtime"],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}