Include url in APIError #5076

Closed
opened 2026-02-16 17:48:28 -05:00 by yindo · 0 comments
Owner

Originally created by @jkoelker on GitHub (Jan 12, 2026).

Originally assigned to: @thdxr on GitHub.

Description

I'm tracking down something making a call out to github with the GITHUB_TOKEN from CI where its failing with:

{
  "type": "error",
  "timestamp": 1768244534087,
  "sessionID": "ses_44c69aa3cffe50xg95ga1V780c",
  "error": {
    "name": "APIError",
    "data": {
      "message": "Bad Request: bad request: GitHub App Server-To-Server Tokens are not supported for this endpoint",
      "statusCode": 400,
      "isRetryable": false,
      "responseHeaders": {
        "content-length": "84",
        "content-security-policy": "default-src none; sandbox",
        "content-type": "text/plain; charset=utf-8",
        "date": "Mon, 12 Jan 2026 19:02:14 GMT",
        "strict-transport-security": "max-age=31536000",
        "x-content-type-options": "nosniff",
        "x-github-backend": "Kubernetes",
        "x-github-request-id": "0804:3A992E:7815BF:8832BC:69654534"
      },
      "responseBody": "bad request: GitHub App Server-To-Server Tokens are not supported for this endpoint\n"
    }
  }
}

Tracking down what exactly is making this call is difficult as its only in CI. Including the URL where the underlying APICallError was calling would greatly help.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @jkoelker on GitHub (Jan 12, 2026). Originally assigned to: @thdxr on GitHub. ### Description I'm tracking down something making a call out to github with the `GITHUB_TOKEN` from CI where its failing with: ```json { "type": "error", "timestamp": 1768244534087, "sessionID": "ses_44c69aa3cffe50xg95ga1V780c", "error": { "name": "APIError", "data": { "message": "Bad Request: bad request: GitHub App Server-To-Server Tokens are not supported for this endpoint", "statusCode": 400, "isRetryable": false, "responseHeaders": { "content-length": "84", "content-security-policy": "default-src none; sandbox", "content-type": "text/plain; charset=utf-8", "date": "Mon, 12 Jan 2026 19:02:14 GMT", "strict-transport-security": "max-age=31536000", "x-content-type-options": "nosniff", "x-github-backend": "Kubernetes", "x-github-request-id": "0804:3A992E:7815BF:8832BC:69654534" }, "responseBody": "bad request: GitHub App Server-To-Server Tokens are not supported for this endpoint\n" } } } ``` Tracking down what exactly is making this call is difficult as its only in CI. Including the URL where the underlying `APICallError` was calling would greatly help. ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:48:28 -05:00
yindo closed this issue 2026-02-16 17:48:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5076