tryCatchSync() — supabase Function Reference
Architecture documentation for the tryCatchSync() function in helpers.fn.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 620eb5e5_42b1_d747_7a19_0bcd646c2b0b["tryCatchSync()"] dc251b6d_906f_6c94_fad9_efde7dffb5a6["doFetchErrorCodes()"] dc251b6d_906f_6c94_fad9_efde7dffb5a6 -->|calls| 620eb5e5_42b1_d747_7a19_0bcd646c2b0b 2373fead_7dbc_efa1_871c_2e08f6c27649["ok()"] 620eb5e5_42b1_d747_7a19_0bcd646c2b0b -->|calls| 2373fead_7dbc_efa1_871c_2e08f6c27649 1ee162b1_d232_4846_ef61_0018a3d5f851["error()"] 620eb5e5_42b1_d747_7a19_0bcd646c2b0b -->|calls| 1ee162b1_d232_4846_ef61_0018a3d5f851 style 620eb5e5_42b1_d747_7a19_0bcd646c2b0b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/helpers.fn.ts lines 45–55
static tryCatchSync<Ok, Error, Args extends Array<unknown>>(
fn: (...args: Args) => Ok,
onError: (error: unknown) => Error,
...args: Args
): Result<Ok, Error> {
try {
return Result.ok(fn(...args))
} catch (error: unknown) {
return Result.error(onError(error))
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does tryCatchSync() do?
tryCatchSync() is a function in the supabase codebase.
What does tryCatchSync() call?
tryCatchSync() calls 2 function(s): error, ok.
What calls tryCatchSync()?
tryCatchSync() is called by 1 function(s): doFetchErrorCodes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free