Skip to content

fix(realtime): respect custom logger for send() REST fallback warning - #2612

Merged
mandarini merged 2 commits into
masterfrom
fix/realtime-rest-fallback-logger
Aug 14, 2026
Merged

mandarini merged 2 commits into
masterfrom
fix/realtime-rest-fallback-logger

Conversation

@mandarini

@mandarini mandarini commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2611.

The REST fallback warning in RealtimeChannel.send() was a hardcoded console.warn(), so it always printed and couldn't be disabled or redirected even if a custom logger was configured on the client. This routes the warning through the client's existing logging mechanism when a custom logger is set, falling back to the original console.warn() otherwise, so default behavior is unchanged for everyone who hasn't configured a logger.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 330b0f46-665b-408b-8f3f-80e0fc7588cb

📥 Commits

Reviewing files that changed from the base of the PR and between 5d6b93d and 89de09e.

📒 Files selected for processing (1)
  • sdk-compliance.yaml

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for detecting whether a custom realtime logger is configured.
  • Bug Fixes

    • REST fallback warnings now use the configured logger when available.
    • Default warning behavior remains available through the console when no custom logger is configured.
  • Tests

    • Added coverage for logger-based and default warning behavior.
    • Improved cleanup for fallback scenario tests.
    • Added compliance coverage for the logger detection capability.

Walkthrough

The change adds logger availability checks to RealtimeClient and SocketAdapter. RealtimeChannel.send() now routes REST fallback warnings through the configured logger and retains console.warn when no logger exists. Tests cover both warning paths and clean up HTTP fallback state.

Assessment against linked issues

Objective Addressed Explanation
Allow control of REST fallback warning logs [#2611] ✅

Merge Risk: ⚪ Minimal · up to 89de0

This change routes the REST fallback warning through a configured custom logger while preserving the existing console warning by default; no actionable merge-blocking risk remains.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the realtime-js Related to the realtime-js library. label Aug 14, 2026
@mandarini mandarini self-assigned this Aug 14, 2026
@mandarini
mandarini marked this pull request as ready for review August 14, 2026 12:49
@mandarini
mandarini requested review from a team as code owners August 14, 2026 12:49
@mandarini
mandarini requested review from a team as code owners August 14, 2026 12:56
@mandarini
mandarini merged commit a249594 into master Aug 14, 2026
8 checks passed
@mandarini
mandarini deleted the fix/realtime-rest-fallback-logger branch August 14, 2026 13:04
mandarini pushed a commit to supabase/ssr that referenced this pull request Aug 24, 2026
This PR updates `@supabase/supabase-js` to v2.112.4.

**Source**: supabase-js-stable-release

---

## Release Notes

## v2.112.4

## 2.112.4 (2026-08-24)

### 🩹 Fixes

- **auth:** convert stolen-lock AbortError when acquireTimeout is 0
([#2616](supabase/supabase-js#2616))
- **auth:** warn on deprecated lock option and prevent unhandled refresh
rejection ([#2627](supabase/supabase-js#2627))
- **postgrest:** move override fixtures out of generated types, repair
codegen ([#2605](supabase/supabase-js#2605))
- **realtime:** respect custom logger for send() REST fallback warning
([#2612](supabase/supabase-js#2612))

### ❤️ Thank You

- Katerina Skroumpelou @mandarini
- mmustafasenoglu @mmustafasenoglu

This PR was created automatically.

Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
mandarini added a commit to supabase/supabase that referenced this pull request Aug 25, 2026
This PR updates @supabase/*-js libraries to version 2.112.4.

**Source**: manual

**Changes**:
- Updated @supabase/supabase-js to 2.112.4
- Updated @supabase/auth-js to 2.112.4
- Updated @supabase/realtime-js to 2.112.4
- Updated @supabase/postgest-js to 2.112.4
- Refreshed pnpm-lock.yaml

---

## Release Notes

## v2.112.4

## 2.112.4 (2026-08-24)

### 🩹 Fixes

- **auth:** convert stolen-lock AbortError when acquireTimeout is 0
([#2616](supabase/supabase-js#2616))
- **auth:** warn on deprecated lock option and prevent unhandled refresh
rejection ([#2627](supabase/supabase-js#2627))
- **postgrest:** move override fixtures out of generated types, repair
codegen ([#2605](supabase/supabase-js#2605))
- **realtime:** respect custom logger for send() REST fallback warning
([#2612](supabase/supabase-js#2612))

### ❤️ Thank You

- Katerina Skroumpelou @mandarini
- mmustafasenoglu @mmustafasenoglu

This PR was created automatically.

Co-authored-by: mandarini <[email protected]>
karan-963 pushed a commit to karan-963/supabase-js that referenced this pull request Oct 13, 2026
karan-963 pushed a commit to karan-963/supabase-js that referenced this pull request Oct 28, 2026
karan-963 pushed a commit to karan-963/supabase-js that referenced this pull request Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

realtime-js Related to the realtime-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Realtime send() is automatically falling back to REST API

3 participants