Home / Function/ uploadErrorCodes() — supabase Function Reference

uploadErrorCodes() — supabase Function Reference

Architecture documentation for the uploadErrorCodes() function in errorSync.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  14f27b08_0e10_0fcd_c334_5e9fe100ee64["uploadErrorCodes()"]
  5ac3111b_e635_2e95_edf9_68bd0c98535c["syncErrorCodes()"]
  5ac3111b_e635_2e95_edf9_68bd0c98535c -->|calls| 14f27b08_0e10_0fcd_c334_5e9fe100ee64
  040a5796_eb59_9ff7_60d0_b127fcaa25c2["map()"]
  14f27b08_0e10_0fcd_c334_5e9fe100ee64 -->|calls| 040a5796_eb59_9ff7_60d0_b127fcaa25c2
  17411894_7186_a407_6843_dddad6237c7c["supabaseAdmin()"]
  14f27b08_0e10_0fcd_c334_5e9fe100ee64 -->|calls| 17411894_7186_a407_6843_dddad6237c7c
  84384790_01b6_e631_0028_dbfb92612ec2["handleErrorCodeUploadErrors()"]
  14f27b08_0e10_0fcd_c334_5e9fe100ee64 -->|calls| 84384790_01b6_e631_0028_dbfb92612ec2
  f0cb3c6d_e823_6f6f_b9a4_ab144fc70aa5["extractMessageFromAnyError()"]
  14f27b08_0e10_0fcd_c334_5e9fe100ee64 -->|calls| f0cb3c6d_e823_6f6f_b9a4_ab144fc70aa5
  style 14f27b08_0e10_0fcd_c334_5e9fe100ee64 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/resources/error/errorSync.ts lines 105–118

async function uploadErrorCodes(
  errorCodes: Array<ErrorCodeUploadParameters>
): Promise<[number, MultiError<never> | undefined]> {
  return Promise.all(
    errorCodes.map(async (errorCode) => {
      return new Result(await supabaseAdmin().schema('content').rpc('update_error_code', errorCode))
    })
  )
    .then((data) => handleErrorCodeUploadErrors(data, errorCodes))
    .catch((error) => [
      0,
      new MultiError(`Error uploading error codes: ${extractMessageFromAnyError(error)}`, [error]),
    ])
}

Subdomains

Called By

Frequently Asked Questions

What does uploadErrorCodes() do?
uploadErrorCodes() is a function in the supabase codebase.
What does uploadErrorCodes() call?
uploadErrorCodes() calls 4 function(s): extractMessageFromAnyError, handleErrorCodeUploadErrors, map, supabaseAdmin.
What calls uploadErrorCodes()?
uploadErrorCodes() is called by 1 function(s): syncErrorCodes.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free