MCPcopy Create free account
hub / github.com/simstudioai/sim / codeFromApiClientError

Function codeFromApiClientError

apps/sim/app/invite/[id]/invite.tsx:154–161  ·  view source on GitHub ↗
(error: ApiClientError)

Source from the content-addressed store, hash-verified

152}
153
154function codeFromApiClientError(error: ApiClientError): string {
155 if (error.body && typeof error.body === 'object') {
156 const code = (error.body as { error?: unknown }).error
157 if (typeof code === 'string' && code.length > 0) return code
158 }
159
160 return codeFromStatus(error.status)
161}
162
163export default function Invite() {
164 const router = useRouter()

Callers 2

fetchInvitationFunction · 0.85
handleAcceptInvitationFunction · 0.85

Calls 1

codeFromStatusFunction · 0.85

Tested by

no test coverage detected