fetchTotalErrorCount() — supabase Function Reference
Architecture documentation for the fetchTotalErrorCount() function in errorModel.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 4ee0e422_ccba_fcca_f32d_ae215bba546a["fetchTotalErrorCount()"] 50f617d6_81f5_4c21_6f5a_c2f5e6cbefd2["loadErrors()"] 50f617d6_81f5_4c21_6f5a_c2f5e6cbefd2 -->|calls| 4ee0e422_ccba_fcca_f32d_ae215bba546a b2812979_6579_ca1c_1f1d_fba7d2763a1c["supabase()"] 4ee0e422_ccba_fcca_f32d_ae215bba546a -->|calls| b2812979_6579_ca1c_1f1d_fba7d2763a1c 1ee162b1_d232_4846_ef61_0018a3d5f851["error()"] 4ee0e422_ccba_fcca_f32d_ae215bba546a -->|calls| 1ee162b1_d232_4846_ef61_0018a3d5f851 2373fead_7dbc_efa1_871c_2e08f6c27649["ok()"] 4ee0e422_ccba_fcca_f32d_ae215bba546a -->|calls| 2373fead_7dbc_efa1_871c_2e08f6c27649 style 4ee0e422_ccba_fcca_f32d_ae215bba546a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/resources/error/errorModel.ts lines 135–158
async function fetchTotalErrorCount(
service?: Service,
code?: string
): Promise<Result<number, PostgrestError>> {
const query = supabase()
.schema('content')
.from('error')
.select('id, service!inner(name)', { count: 'exact', head: true })
.is('deleted_at', null)
if (service) {
query.eq('service.name', service)
}
if (code) {
query.eq('code', code)
}
const { count, error } = await query
if (error) {
return Result.error(error)
}
return Result.ok(count ?? 0)
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does fetchTotalErrorCount() do?
fetchTotalErrorCount() is a function in the supabase codebase.
What does fetchTotalErrorCount() call?
fetchTotalErrorCount() calls 3 function(s): error, ok, supabase.
What calls fetchTotalErrorCount()?
fetchTotalErrorCount() is called by 1 function(s): loadErrors.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free