diegosouzapw/OmniRoute · error · Error

Devin send message failed

Error message

Devin send message failed: ${response.status} ${error}

What it means

Thrown in DevinCloudAgent.sendMessage when the POST to the Devin API session-message endpoint returns a non-2xx status. The status code and the upstream response body are embedded in the message, so the failure is an upstream API rejection (auth failure, invalid externalId/session, expired session, rate limit, or server error), not a local input error.

Solutions

  1. Log response.status and the upstream body to determine whether the API key is valid and the session externalId exists
  2. For 401/403, prompt the user to re-authenticate or update the Devin API key in credentials
  3. For 404, verify the session externalId corresponds to an existing Devin session
  4. For 429/5xx, surface a retryable failure and retry with backoff
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/lib/cloudAgent/agents/devin.ts:121 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/05e369bf55986cc1. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/cloudAgent/agents/devin.ts:121

  }

  async sendMessage(
    externalId: string,
    message: string,
    credentials: AgentCredentials
  ): Promise<CloudAgentActivity> {
    const response = await fetch(`${this.baseUrl}/sessions/${externalId}/message`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: `Bearer ${credentials.apiKey}`,
      },
      body: JSON.stringify({ content: message }),
    });

    if (!response.ok) {
      const error = await response.text();
      throw new Error(`Devin send message failed: ${response.status} ${error}`);
    }

    return {
      id: this.generateActivityId(),
      type: "message",
      content: message,
      timestamp: new Date().toISOString(),
    };
  }

  async listSources(
    _credentials: AgentCredentials
  ): Promise<{ name: string; url: string; branch?: string }[]> {
    return [];
  }
}

View on GitHub (pinned to a179ffed5b)