namespace ZB.MOM.WW.MxGateway.Server.Workers;

public enum WorkerClientErrorCode
{
    InvalidState,
    ProtocolViolation,
    PipeDisconnected,
    CommandTimeout,
    WorkerFaulted,
    HeartbeatExpired,
    ShutdownTimeout,
    GatewayShutdown,
    WriteFailed,
    PendingCommandLimitExceeded,

    // The serialized command envelope exceeds the negotiated worker-frame maximum. Rejected at the
    // enqueue boundary so only the offending command fails (mapped to ResourceExhausted) instead of
    // the oversized frame reaching the write loop and faulting the whole session.
    CommandTooLarge,
}
