Skip to content

Commit

Permalink
temporarily remove shouldThrowOnError
Browse files Browse the repository at this point in the history
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
  • Loading branch information
inian committed Aug 10, 2022
1 parent 8e8087e commit c47fcb8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/SupabaseClient.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -106,7 +104,6 @@ export default class SupabaseClient<
headers: this.headers,
schema: options?.db?.schema,
fetch: this.fetch,
throwOnError: this.shouldThrowOnError,
})

this._listenForAuthEvents()
Expand Down
4 changes: 0 additions & 4 deletions src/lib/types.ts
Expand Up @@ -53,10 +53,6 @@ export type SupabaseClientOptions<SchemaName> = {
* Optional headers for initializing the client.
*/
headers?: Record<string, string>
/**
* Throw errors, instead of returning them.
*/
shouldThrowOnError?: boolean
}

export type SupabaseRealtimePayload<T> = {
Expand Down

0 comments on commit c47fcb8

Please sign in to comment.