---
title: "Error codes"
description: "The Kafka error codes monedula-sim-bridge returns on its own, the ones the playground answers with, and how the WebSocket refuses a tab."
url: https://monedula.dev/flock/docs/sim-bridge/reference/error-codes/
---
Most errors your client sees come from the playground, which answers as the simulated broker would. A few come from the bridge itself: when it cannot decode a request, when it does not know a topic id, when an ACL request reaches it with no authorizer, and when the playground does not answer in time. All of them are Kafka's own codes, so clients handle them as they would with a broker.

## Returned by the bridge

| Code | Name | When |
| --- | --- | --- |
| 2 | `CORRUPT_MESSAGE` | A produced batch that cannot be decoded, or a compressed batch that does not decompress. |
| 5 | `LEADER_NOT_AVAILABLE` | Metadata while no tab answers: no brokers, and this error on every requested topic. |
| 6 | `NOT_LEADER_OR_FOLLOWER` | A Fetch or ListOffsets partition the tab did not answer in time. |
| 7 | `REQUEST_TIMED_OUT` | A Produce partition the tab did not answer within the request's timeout, and CreateTopics, DeleteTopics, DeleteRecords, CreatePartitions, AlterConfigs, IncrementalAlterConfigs, DescribeConfigs, DescribeCluster, DescribeLogDirs, DescribeQuorum, DescribeProducers or WriteTxnMarkers with no answer from the tab. |
| 15 | `COORDINATOR_NOT_AVAILABLE` | A group, offset, producer id or transaction request (FindCoordinator, JoinGroup, SyncGroup, Heartbeat, LeaveGroup, ConsumerGroupHeartbeat, OffsetCommit, OffsetFetch, InitProducerId, AddPartitionsToTxn, AddOffsetsToTxn, EndTxn, TxnOffsetCommit, DescribeTransactions, ListTransactions, ListGroups, DescribeGroups, ConsumerGroupDescribe, DeleteGroups) with no answer from the tab. |
| 35 | `UNSUPPORTED_VERSION` | ApiVersions above version 5; the client retries with a lower version. |
| 54 | `SECURITY_DISABLED` | DescribeAcls, CreateAcls and DeleteAcls: the bridge has no authorizer, as a broker with none configured. |
| 76 | `UNSUPPORTED_COMPRESSION_TYPE` | A produced batch with an unknown codec, or a partition over the request's 64 MiB of records (decompressed, at least 128 bytes a record). |
| 100 | `UNKNOWN_TOPIC_ID` | A request that names a topic by an id the bridge has not seen in a Metadata or CreateTopics answer, or by the id of a topic that was deleted since, also when one was created again under the same name: the new topic has a new id. |

Codes 5, 6, 7 and 15 are retriable, so a client retries them on its own: they are what a client sees while the playground is paused, while the tab is busy, or right after you press **Disconnect**.

The timeouts are the request's own: a Produce's timeout, a Fetch's maximum wait plus 5 seconds, a JoinGroup's rebalance timeout plus 5 seconds, a SyncGroup's session timeout plus 5 seconds, and 30 seconds for everything else. An answer that arrives later is dropped.

A request for an API the bridge does not advertise, or in a version outside its range (see [Supported APIs](/flock/docs/sim-bridge/reference/supported-apis/)), and a request frame over 100 MiB, close the connection without an answer.

## Answered by the playground

The playground answers as a broker would. The codes you are most likely to meet:

| Code | Name | When |
| --- | --- | --- |
| 1 | `OFFSET_OUT_OF_RANGE` | A Fetch below the partition's log start offset or above its high watermark, for example after DeleteRecords; DeleteRecords to an offset above the high watermark. |
| 3 | `UNKNOWN_TOPIC_OR_PARTITION` | The topic or partition does not exist, or the topic is being created while the playground is paused. |
| 6 | `NOT_LEADER_OR_FOLLOWER` | The broker the client asked does not lead the partition, or the leader is dead. DescribeProducers to a broker that holds no replica of the partition. |
| 16 | `NOT_COORDINATOR` | A group request to a broker that is not the group's coordinator, for example after the coordinator was killed. |
| 17 | `INVALID_TOPIC_EXCEPTION` | CreateTopics with a topic name Kafka refuses (over 249 characters, a character outside letters, digits, `.`, `_` and `-`, or `.` or `..`), with Kafka's message. |
| 19 | `NOT_ENOUGH_REPLICAS` | `acks=all` with fewer in-sync replicas than the topic's `min.insync.replicas`. |
| 22, 25, 27 | `ILLEGAL_GENERATION`, `UNKNOWN_MEMBER_ID`, `REBALANCE_IN_PROGRESS` | The usual group protocol answers during a rebalance. |
| 23 | `INCONSISTENT_GROUP_PROTOCOL` | A join, heartbeat or commit uses the id of a simulated group, or the members share no assignor, or a classic member joins a consumer group with another protocol type than `consumer` or with no assignor the group's classic members share. Reading a simulated group's committed offsets works. |
| 36, 37, 38, 44 | `TOPIC_ALREADY_EXISTS`, `INVALID_PARTITIONS`, `INVALID_REPLICATION_FACTOR`, `POLICY_VIOLATION` | CreateTopics refusals; see [Create topics](/flock/docs/sim-bridge/how-to/create-topics/). `INVALID_PARTITIONS` also answers CreatePartitions at or below the current count; `POLICY_VIOLATION` a topic of the playground's topology in DeleteTopics, a count over the cap in CreatePartitions, and DeleteRecords on a topic that is only compacted. |
| 40 | `INVALID_CONFIG` | AlterConfigs or IncrementalAlterConfigs with a topic config the simulator does not model, or a value its validation refuses; CreateTopics with a modeled config whose value its validation refuses. |
| 42 | `INVALID_REQUEST` | A broker config change: no broker config is dynamic in the simulator. DescribeQuorum on a cluster with no KRaft quorum. |
| 68 | `NON_EMPTY_GROUP` | DeleteGroups for a group that still has members, real or simulated. |
| 17 | `INVALID_TOPIC_EXCEPTION` | AddPartitionsToTxn or WriteTxnMarkers with a diskless topic of Ursa or Inkless, and TxnOffsetCommit with a diskless topic of Ursa: they take no transactions. |
| 35 | `UNSUPPORTED_VERSION` | The first ConsumerGroupHeartbeat on a setup without the KIP-848 protocol (AutoMQ, Redpanda, KafScale, Nisshi, Ursa), with a message naming the setup. InitProducerId with a `transactional.id` on KafScale, which implements no transaction API. DescribeProducers on WarpStream, and WriteTxnMarkers on WarpStream and Redpanda, which do not have them. |
| 42 | `INVALID_REQUEST` | A transactional produce to a diskless topic of Ursa or Inkless; a ConsumerGroupHeartbeat with malformed fields. |
| 45, 47 | `OUT_OF_ORDER_SEQUENCE_NUMBER`, `INVALID_PRODUCER_EPOCH` | An idempotent or transactional producer's sequence or epoch does not match. WriteTxnMarkers (`kafka-transactions.sh abort`) with an epoch below the producer's on the partition. A transactional batch still waiting for the produce rate when its transaction is fenced or times out: it is not written, as Kafka's leader refuses a write of the old epoch after the abort marker. |
| 48 | `INVALID_TXN_STATE` | A transaction request out of order (a commit with no transaction; before Produce 11 and TxnOffsetCommit 4, a write to a partition or group not added to it), and a transactional produce to a diskless topic of the KIP-1163 draft. |
| 49, 50, 51 | `INVALID_PRODUCER_ID_MAPPING`, `INVALID_TRANSACTION_TIMEOUT`, `CONCURRENT_TRANSACTIONS` | A transactional id with another producer id; a `transaction.timeout.ms` over 900000 (`transaction.max.timeout.ms`); a new transaction or InitProducerId while the previous one is still completing, which clients retry. At transaction version 2, `CONCURRENT_TRANSACTIONS` also answers a Produce 12 or TxnOffsetCommit 5 while the previous transaction is still being written, and `INVALID_PRODUCER_EPOCH` one with the epoch before the last end. |
| 52 | `TRANSACTION_COORDINATOR_FENCED` | WriteTxnMarkers with a coordinator epoch below the one of the producer's last marker on the partition. |
| 53 | `TRANSACTIONAL_ID_AUTHORIZATION_FAILED` | Any `transactional.id` on Nisshi, which refuses transactions. |
| 81, 82 | `GROUP_MAX_SIZE_REACHED`, `FENCED_INSTANCE_ID` | A consumer group at `group.consumer.max.size`; a static member replaced by a newer one with the same instance id, on its next JoinGroup, SyncGroup, Heartbeat, LeaveGroup, OffsetCommit or ConsumerGroupHeartbeat, in a classic group and in a consumer group alike. |
| 88 | `UNSTABLE_OFFSET_COMMIT` | OffsetFetch with `require_stable` (a `read_committed` consumer) for a partition whose offset an open transaction has staged; the client retries. |
| 90 | `PRODUCER_FENCED` | A producer whose `transactional.id` a newer producer initialized. |
| 105 | `TRANSACTIONAL_ID_NOT_FOUND` | DescribeTransactions for a `transactional.id` no client has initialized. |
| 110, 113 | `FENCED_MEMBER_EPOCH`, `STALE_MEMBER_EPOCH` | A consumer-protocol heartbeat with an epoch the coordinator does not know (the member rejoins); an offset commit or fetch with a stale member epoch. |
| 111, 112 | `UNRELEASED_INSTANCE_ID`, `UNSUPPORTED_ASSIGNOR` | A static member joins with an instance id a live member holds; a server assignor other than `uniform` or `range`. |
| 120 | `TRANSACTION_ABORTABLE` | From Produce 11 and TxnOffsetCommit 4: a transactional write to a partition or group the transaction did not add, as Kafka 4.4 answers it. The client aborts the transaction. |
| 128 | `INVALID_REGULAR_EXPRESSION` | ListTransactions with a transactional id pattern that is not a valid regular expression; a consumer-protocol member subscribing with a regular expression RE2/J refuses, such as a lookahead or a backreference, with RE2/J's description. |
| 69 | `GROUP_ID_NOT_FOUND` | DescribeGroups (version 6 and later) for a group that does not exist, or for a simulated group that is not a classic group. Older versions get a group in state `Dead` instead. A consumer-protocol member joining a classic group that cannot be converted to a consumer group: its members do not use the `consumer` protocol type (Kafka Connect workers), or an assignment carries a custom assignor's user data. Any other consumer-protocol heartbeat to a classic group. |
| -1 | `UNKNOWN_SERVER_ERROR` | A consumer-protocol member joining a classic group in its first rebalance, before the group chose an assignor, as Kafka 4.4 answers it. |

## WebSocket refusals

These reach the playground, not your clients:

| What the playground shows | Why |
| --- | --- |
| The bridge refused the pairing code. | The code does not match the one the bridge printed. |
| This bridge is a different version: update monedula-sim-bridge. | The bridge and the playground speak different versions of their protocol. |
| Another tab is already connected to this bridge. | One tab is paired already; the bridge closed the second with close code 1008, reason `busy`. |
| No bridge answered at ws://127.0.0.1:19190/. | Nothing listens on the port, or the browser blocked the connection. |

A page from an origin the bridge does not allow gets HTTP 403 at the WebSocket upgrade; see [Security](/flock/docs/sim-bridge/concepts/security/).