Skip to main content

Type Alias: ChannelMessagesUnavailableReason

ChannelMessagesUnavailableReason = typeof ChannelMessagesUnavailableReason[keyof typeof ChannelMessagesUnavailableReason]

Defined in: packages/sdk/src/types/generated/chat.ts:98

Why a chat yielded no channel messages, as a closed vocabulary.

A typed reason rather than a 4xx, because none of these are caller mistakes: they are properties of the chat that the caller could not have known before asking. Any chat page may issue this read, so answering "this chat has no parallel wire" with an error would make a perfectly normal web-chat or voice chat surface as a failure — in error logs, in retry counters, and in whatever the client does with a non-2xx.

This is not a claim that the channel set lives only on the server. The UI keeps its own copy in src/components/chat/channel-ghosts/single-channel-chat.ts and uses it to decide whether to fetch at all, so in practice this branch is reached only when the two sets disagree. That coupling is real and worth stating plainly: adding a channel to :data:SINGLE_CHANNEL_CHAT_CHANNELS changes nothing user-visible until the client set is widened too, and removing one here turns a chat the client still queries into an empty-with-reason result rather than an error. Keep the two in sync deliberately; this enum is what makes the mismatch legible instead of silent.