File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ const DEFAULT_GLOBAL_OPTIONS = {
21
21
const DEFAULT_DB_OPTIONS = {
22
22
db : {
23
23
schema : 'public' ,
24
- shouldThrowOnError : false ,
25
24
} ,
26
25
}
27
26
@@ -101,7 +100,6 @@ export default class SupabaseClient<
101
100
}
102
101
// default storage key uses the supabase project ref as a namespace
103
102
const defaultStorageKey = `sb-${ new URL ( this . authUrl ) . hostname . split ( '.' ) [ 0 ] } -auth-token`
104
- this . storageKey = options ?. auth ?. storageKey ?? defaultStorageKey
105
103
106
104
const {
107
105
db : dbOptions ,
@@ -130,15 +128,16 @@ export default class SupabaseClient<
130
128
} ,
131
129
}
132
130
133
- this . headers = { ...DEFAULT_HEADERS , ...globalOptions ?. headers }
131
+ this . storageKey = settings . auth . storageKey
132
+ this . headers = settings . global . headers
134
133
135
134
this . auth = this . _initSupabaseAuthClient ( settings . auth , this . headers , settings . global . fetch )
136
135
this . fetch = fetchWithAuth ( supabaseKey , this . _getAccessToken . bind ( this ) , settings . global . fetch )
137
136
138
137
this . realtime = this . _initRealtimeClient ( { headers : this . headers , ...settings . realtime } )
139
138
this . rest = new PostgrestClient ( `${ _supabaseUrl } /rest/v1` , {
140
139
headers : this . headers ,
141
- schema : settings ? .db ?. schema ,
140
+ schema : settings . db ?. schema ,
142
141
fetch : this . fetch ,
143
142
} )
144
143
Original file line number Diff line number Diff line change @@ -13,10 +13,6 @@ export type SupabaseClientOptions<SchemaName> = {
13
13
*/
14
14
db ?: {
15
15
schema ?: SchemaName
16
- /**
17
- * Throw errors, instead of returning them.
18
- */
19
- shouldThrowOnError ?: boolean
20
16
}
21
17
22
18
auth ?: {
You can’t perform that action at this time.
0 commit comments