From c47fcb827ac21a5a0e266386ecb035c0b592376a Mon Sep 17 00:00:00 2001 From: Inian Date: Wed, 10 Aug 2022 16:13:08 +0800 Subject: [PATCH] temporarily remove shouldThrowOnError Till all the client libraries support this option. Once they do, we can add this option back in to the parent library as a non-breaking change --- src/SupabaseClient.ts | 3 --- src/lib/types.ts | 4 ---- 2 files changed, 7 deletions(-) diff --git a/src/SupabaseClient.ts b/src/SupabaseClient.ts index ee068646..ecd70b1b 100644 --- a/src/SupabaseClient.ts +++ b/src/SupabaseClient.ts @@ -50,7 +50,6 @@ export default class SupabaseClient< protected storageKey: string protected fetch?: Fetch protected changedAccessToken: string | undefined - protected shouldThrowOnError: boolean protected headers: { [key: string]: string @@ -96,7 +95,6 @@ export default class SupabaseClient< const settings = { ...DEFAULT_OPTIONS, ...options, storageKey: this.storageKey } this.headers = { ...DEFAULT_HEADERS, ...options?.headers } - this.shouldThrowOnError = settings.shouldThrowOnError || false this.auth = this._initSupabaseAuthClient(settings.auth || {}, this.headers, settings.fetch) this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.fetch) @@ -106,7 +104,6 @@ export default class SupabaseClient< headers: this.headers, schema: options?.db?.schema, fetch: this.fetch, - throwOnError: this.shouldThrowOnError, }) this._listenForAuthEvents() diff --git a/src/lib/types.ts b/src/lib/types.ts index 671c4ba2..83f5000c 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -53,10 +53,6 @@ export type SupabaseClientOptions = { * Optional headers for initializing the client. */ headers?: Record - /** - * Throw errors, instead of returning them. - */ - shouldThrowOnError?: boolean } export type SupabaseRealtimePayload = {