Skip to content

Commit 3e8baa2

Browse files
authored
chore: Disable sending the Lock error to Sentry (supabase#39999)
Disable sending the Lock error to Sentry.
1 parent 3bc91b2 commit 3e8baa2

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

apps/docs/lib/userAuth.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import * as Sentry from '@sentry/nextjs'
2-
import { gotrueClient, setCaptureException } from 'common'
1+
import { gotrueClient } from 'common'
32
import { useEffect } from 'react'
43

5-
setCaptureException((e: any) => {
6-
Sentry.captureException(e)
7-
})
8-
94
export const auth = gotrueClient
105

116
export async function getAccessToken() {

apps/studio/lib/gotrue.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import * as Sentry from '@sentry/nextjs'
21
import type { JwtPayload } from '@supabase/supabase-js'
32
import { getAccessToken, type User } from 'common/auth'
4-
import { gotrueClient, setCaptureException } from 'common/gotrue'
5-
6-
setCaptureException((e: any) => {
7-
Sentry.captureException(e)
8-
})
3+
import { gotrueClient } from 'common/gotrue'
94

105
export const auth = gotrueClient
116
export { getAccessToken }

packages/common/gotrue.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ const logIndexedDB = (message: string, ...args: any[]) => {
115115
})()
116116
}
117117

118+
/**
119+
* Reference to a function that captures exceptions for debugging purposes to be sent to Sentry.
120+
*/
118121
let captureException: ((e: any) => any) | null = null
119122

120123
export function setCaptureException(fn: typeof captureException) {

0 commit comments

Comments
 (0)