MCPcopy Index your code
hub / github.com/simstudioai/sim / getPostgresErrorCode

Function getPostgresErrorCode

apps/sim/lib/credentials/oauth.ts:19–23  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

17}
18
19function getPostgresErrorCode(error: unknown): string | undefined {
20 if (!error || typeof error !== 'object') return undefined
21 const err = error as { code?: string; cause?: { code?: string } }
22 return err.code || err.cause?.code
23}
24
25/**
26 * Normalizes display names and ensures credential memberships for existing

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected