[PR #4759] fix: handle undefined response from auth plugin fetch #11101

Closed
opened 2026-02-16 18:15:53 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4759

State: closed
Merged: No


Fixes #2012

Auth plugins can return undefined from custom fetch when token refresh fails temporarily. This adds a guard that throws a retryable APICallError, letting existing retry logic handle it automatically.

The error was: TypeError: undefined is not an object (evaluating 'response.headers')

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4759 **State:** closed **Merged:** No --- Fixes #2012 Auth plugins can return undefined from custom fetch when token refresh fails temporarily. This adds a guard that throws a retryable APICallError, letting existing retry logic handle it automatically. The error was: `TypeError: undefined is not an object (evaluating 'response.headers')`
yindo added the pull-request label 2026-02-16 18:15:53 -05:00
yindo closed this issue 2026-02-16 18:15:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11101