Home / Function/ fromErrors() — supabase Function Reference

fromErrors() — supabase Function Reference

Architecture documentation for the fromErrors() function in utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  a2b11de1_3d7b_be72_32dc_7d4ef0495eb0["fromErrors()"]
  50f617d6_81f5_4c21_6f5a_c2f5e6cbefd2["loadErrors()"]
  50f617d6_81f5_4c21_6f5a_c2f5e6cbefd2 -->|calls| a2b11de1_3d7b_be72_32dc_7d4ef0495eb0
  style a2b11de1_3d7b_be72_32dc_7d4ef0495eb0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/app/api/utils.ts lines 108–121

  public static fromErrors(
    countError: PostgrestError | undefined,
    dataError: PostgrestError | undefined
  ): CollectionQueryError {
    const fetchFailedFor =
      countError && dataError ? 'count and collection' : countError ? 'count' : 'collection'
    let message = `Failed to fetch ${fetchFailedFor}`
    if (countError) message += `: CountError: ${countError.message}`
    if (dataError) message += `: CollectionError: ${dataError.message}`
    return new CollectionQueryError(message, {
      count: countError,
      data: dataError,
    })
  }

Subdomains

Called By

Frequently Asked Questions

What does fromErrors() do?
fromErrors() is a function in the supabase codebase.
What calls fromErrors()?
fromErrors() 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