RealTimeX
Sign inStart for free
RealTimeXWeb Package
IntroductionPrerequisitesInstallationProject setupQuick start
Package structureConfigurationComponentsHooksAPI integrationSocket events
OverviewReplace entire UIReplace componentsStyle with classNamesThemes & localePhone & video callingIn-call control barFeatures
Unread badgeRich-text messagesPins, stars & datesMessage threadsMentionsCanvas & draftsNotificationsAdmin permissionsServer refusalsSession & token refresh
Host app integrationTroubleshootingFAQVersion historyBest practicesSupport & contact
Web packageBuilt-in features

When the server refuses an action

The backend enforces every limit itself. The package undoes what it drew early and shows the server's message - nothing to wire up.

Overview

Whatever the UI shows, the server enforces every limit. When it refuses something, the package undoes exactly what it had drawn early and shows the server's message (which already contains the number).

What the user sees

RefusalWhat the user sees
A message, thread reply or file send refused (ATTACHMENTS_DISABLED, TOO_MANY_ATTACHMENTS, ATTACHMENT_TYPE_NOT_ALLOWED, ATTACHMENT_TOO_LARGE, …)That message disappears and its text and files go back into the composer
MESSAGE_RATE_LIMITED (too many messages a minute)The same, plus a banner counting down until sending works again. Other actions keep working
Pin / unpin refused (PIN_LIMIT_REACHED, …)The pin is undone on that message
Forward refused“Couldn't forward the message. …” and the forward dialog stops waiting
Removed from a group (NOT_A_PARTICIPANT)The conversation and its messages leave the list; if it was open it closes with the message
Group create refused (GROUP_CREATION_DISABLED, GROUP_LIMIT_REACHED, GROUP_MEMBER_LIMIT_REACHED)A notification with the server's message; the form stays filled
Too many requests from the network (HTTP 429, global limit)Requests pause until the server's reset time, with a countdown banner

How the right message is rolled back

Each send carries a tempId, and the server names it when it refuses, so the right message is rolled back even when several are in flight. File sizes are checked when the upload link is requested (fileSize), before any upload.

Read the code and message of any failed package API call with getApiErrorCode(err) / getApiErrorMessage(err, fallback).

PreviousAdmin permissionsNextSession & token refresh

On this page

OverviewWhat the user seesHow the right message is rolled back
Back to top