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

Function extractErrorCode

apps/sim/lib/oauth/oauth.ts:1498–1504  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1496export type RefreshTokenResult = RefreshTokenSuccess | RefreshTokenFailure
1497
1498function extractErrorCode(value: unknown): string | undefined {
1499 if (value && typeof value === 'object' && 'error' in value) {
1500 const code = (value as { error: unknown }).error
1501 if (typeof code === 'string') return code
1502 }
1503 return undefined
1504}
1505
1506/**
1507 * Hard deadline on the token-endpoint exchange. This function does not coalesce

Callers 1

refreshOAuthTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected