Skip to content

Commit 9efc08c

Browse files
authored
fix(hyper): render error messages from back-end (#3513)
* Superseeds #3508
1 parent bdad0f1 commit 9efc08c

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

internal/agent/agent.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,10 +1160,6 @@ func (a *sessionAgent) Run(ctx context.Context, call SessionAgentCall) (result *
11601160
currentAssistant.AddFinish(message.FinishReasonCanceled, "User canceled request", "")
11611161
} else if isHyper && errors.As(err, &providerErr) && providerErr.StatusCode == http.StatusUnauthorized {
11621162
currentAssistant.AddFinish(message.FinishReasonError, "Unauthorized", `Please re-authenticate with Hyper. You can also run "crush auth" to re-authenticate.`)
1163-
} else if isHyper && errors.As(err, &providerErr) && providerErr.StatusCode == http.StatusPaymentRequired {
1164-
url := hyper.BaseURL()
1165-
link := linkStyle.Hyperlink(url, "id=hyper").Render(url)
1166-
currentAssistant.AddFinish(message.FinishReasonError, "No credits", "You're out of credits. Add more at "+link)
11671163
} else if errors.As(err, &providerErr) {
11681164
if providerErr.Message == "The requested model is not supported." {
11691165
url := "https://github.com/settings/copilot/features"

0 commit comments

Comments
 (0)