Skip to content

Commit

Permalink
πŸ› fix: fix panic caused by errors (lobehub#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartialBE committed Mar 13, 2024
1 parent 113ed77 commit d941faa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion providers/minimax/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package minimax

import (
"encoding/json"
"errors"
"net/http"
"one-api/common"
"one-api/common/requester"
Expand Down Expand Up @@ -62,7 +63,7 @@ func (p *MiniMaxProvider) getChatRequest(request *types.ChatCompletionRequest) (
// θŽ·ε–θ―·ζ±‚εœ°ε€
fullRequestURL := p.GetFullRequestURL(url, request.Model)
if fullRequestURL == "" {
return nil, common.ErrorWrapper(nil, "invalid_minimax_config", http.StatusInternalServerError)
return nil, common.ErrorWrapper(errors.New("API KEY is filled in incorrectly"), "invalid_minimax_config", http.StatusInternalServerError)
}

// θŽ·ε–θ―·ζ±‚ε€΄
Expand Down

0 comments on commit d941faa

Please sign in to comment.