Skip to content

Commit ec4dec4

Browse files
committed
feat: add errors to Realtime payload
1 parent abec733 commit ec4dec4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/lib/SupabaseRealtimeClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export class SupabaseRealtimeClient {
5353
eventType: payload.type,
5454
new: {},
5555
old: {},
56+
errors: payload.errors,
5657
}
5758

5859
enrichedPayload = { ...enrichedPayload, ...this.getPayloadRecords(payload) }

src/lib/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export type SupabaseRealtimePayload<T> = {
5353
new: T
5454
/** The previous record. Present for 'UPDATE' and 'DELETE' events. */
5555
old: T
56+
errors: string[] | null
5657
}
5758

5859
export type SupabaseEventTypes = 'INSERT' | 'UPDATE' | 'DELETE' | '*'

0 commit comments

Comments
 (0)