tryCatchFlat() — supabase Function Reference
Architecture documentation for the tryCatchFlat() function in helpers.fn.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 0483845d_079f_75e1_7fe8_82b5925bc5ff["tryCatchFlat()"] 2c203944_18cb_c4c8_6bd8_890a531836af["createContentEmbedding()"] 2c203944_18cb_c4c8_6bd8_890a531836af -->|calls| 0483845d_079f_75e1_7fe8_82b5925bc5ff 59ccc7d0_db28_d610_c9ca_eae107d8d1fa["resolveSingleError()"] 59ccc7d0_db28_d610_c9ca_eae107d8d1fa -->|calls| 0483845d_079f_75e1_7fe8_82b5925bc5ff 755e8915_9c62_434e_3517_2349a2c7b217["resolveErrors()"] 755e8915_9c62_434e_3517_2349a2c7b217 -->|calls| 0483845d_079f_75e1_7fe8_82b5925bc5ff b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312["resolveSearch()"] b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312 -->|calls| 0483845d_079f_75e1_7fe8_82b5925bc5ff 1ee162b1_d232_4846_ef61_0018a3d5f851["error()"] 0483845d_079f_75e1_7fe8_82b5925bc5ff -->|calls| 1ee162b1_d232_4846_ef61_0018a3d5f851 style 0483845d_079f_75e1_7fe8_82b5925bc5ff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/helpers.fn.ts lines 69–84
static async tryCatchFlat<
Ok,
Args extends Array<unknown> = [],
OuterError = unknown,
InnerError = unknown,
>(
fn: (...args: Args) => Promise<Result<Ok, InnerError>>,
onError: (error: unknown) => OuterError | InnerError,
...args: Args
): Promise<Result<Ok, OuterError | InnerError>> {
try {
return await fn(...args)
} catch (error: unknown) {
return Result.error(onError(error))
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does tryCatchFlat() do?
tryCatchFlat() is a function in the supabase codebase.
What does tryCatchFlat() call?
tryCatchFlat() calls 1 function(s): error.
What calls tryCatchFlat()?
tryCatchFlat() is called by 4 function(s): createContentEmbedding, resolveErrors, resolveSearch, resolveSingleError.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free