different-ai/openwork · error · ProbeFailure

${message}

Error message

${message}

What it means

Error "${message}" thrown in different-ai/openwork.

Source

Thrown at packages/enterprise-mcp-mock-server/src/testing/probe.ts:317

async function expectOk(response: Response, phase: HandshakePhase): Promise<Response> {
  if (response.ok) return response
  let message = `HTTP ${response.status}`
  let category = defaultCategory(phase)
  try {
    const body = await boundedResponseText(response, phase, category)
    const parsed: unknown = JSON.parse(body)
    const errorBody = z.object({ error: z.string(), error_description: z.string().optional(), message: z.string().optional() }).safeParse(parsed)
    if (errorBody.success) {
      message = errorBody.data.error_description ?? errorBody.data.message ?? errorBody.data.error
      if (errorBody.data.error === "invalid_client") category = "oauth_client_registration"
      if (errorBody.data.error === "invalid_grant") category = "oauth_token"
      if (errorBody.data.error === "dynamic_client_registration_required") category = "oauth_dynamic_registration_required"
      if (message.includes("redirect URI is not an allowed destination")) category = "oauth_redirect_uri_whitelist"
    }
  } catch {
    // Status and phase remain sufficient safe evidence.
  }
  throw new ProbeFailure(phase, category, message)
}

async function safeHttpErrorMessage(response: Response, phase: HandshakePhase, category: string): Promise<string> {
  const text = await boundedResponseText(response, phase, category)
  try {
    const parsed: unknown = JSON.parse(text)
    const errorBody = z.object({ error: z.string().optional(), error_description: z.string().optional(), message: z.string().optional() }).safeParse(parsed)
    if (errorBody.success) return errorBody.data.error_description ?? errorBody.data.message ?? errorBody.data.error ?? `HTTP ${response.status}`
  } catch {
    // The HTTP status remains sufficient safe evidence.
  }
  return text.trim() || `HTTP ${response.status}`
}

function recordPassed(phases: ProbePhaseResult[], phase: HandshakePhase, startedAt: number, summary: string): void {
  phases.push({ phase, status: "passed", elapsedMs: Date.now() - startedAt, summary })
}

View on GitHub (pinned to 2b7df46e8a)

When it happens

Trigger: Thrown at packages/enterprise-mcp-mock-server/src/testing/probe.ts:317 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/b8b3166a66dbaa0a. Report an issue: GitHub.