Hosted MCP Credential Error (services/hostedMcpCredentialError.ts)

commonly · backend/services/hostedMcpCredentialError.ts · typescript · Apache-2.0
infra, auth, lang:typescript, tag:error, tag:backend, tag:hosted-mcp

Custom error class representing credential‑related failures across refresh, drift assessment, and broker services, indicating retryability and specific error codes.

// Source: https://github.com/Team-Commonly/commonly | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/** Credential failures shared by refresh, drift assessment and the broker. */
export type HostedMcpCredentialErrorCode =
  | 'connection_mismatch'
  | 'reconnect_required'
  | 'credential_missing'
  | 'refresh_unreachable'
  | 'connection_error'
  | 'credential_refreshing';

export class HostedMcpCredentialError extends Error {
  readonly code: HostedMcpCredentialErrorCode;

  /** Retryable means the next call may work without changing the Connection. */
  readonly retryable: boolean;

  constructor(code: HostedMcpCredentialErrorCode, message: string, retryable = false) {
    supe

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key