Skip to content

Realtime: Better error message when providing incorrect token #53

Closed
@inian

Description

@inian

Bug report

Describe the bug

I get the following error message when not providing an auth token or giving an incorrect token. The error message should say something like incorrect (or missing) token instead of Network timeout.

wss://xxx.supabase.co/realtime/v1: REALTIME DISCONNECTED
wss://xxx.supabase.co/realtime/v1: REALTIME DISCONNECTED
wss://xxx.supabase.co/realtime/v1: REALTIME DISCONNECTED
wss://xxx.supabase.co/realtime/v1: Network timeout. Still waiting...

To Reproduce

const { createClient } = require("@supabase/supabase-js/lib/index");
const supabase = createClient(SUPABASE_URL, "incorrect token");
// or const supabase = createClient(SUPABASE_URL, null);

supabase
  .from("table")
  .on("*", (payload) => {
    console.log("Change received!", payload);
  })
  .subscribe();

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions