Open
Description
Bug report
Describe the bug
The errors are not being unwrapped when calling throwOnError
On a simple model definition like this one:
export interface Database {
public: {
Tables: {
profiles: {
Row: {
id: string
username: string | null
email: string | null
}
Insert: {}
Update: {}
}
}
Views: {}
Functions: {}
Enums: {}
}
}
const supabase = createClient<Database>(...)
const { data } = await supabaseAdmin
.from('profiles')
.select(`*`)
.throwOnError()
The return type of data is Profile[] | undefined, as you can see on the picture
Expected behavior
When unwrapping the error, the return type should be Table[]
.
System information
- Supabase version: V2.0.0 rc@10