mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
amend
This commit is contained in:
parent
0f3a79ab54
commit
5415f1e3cb
1 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ const sendAnthropicMsg: SendLLMMessageFnTypeInternal = ({ messages, onText, onFi
|
|||
stream.on('error', (error) => {
|
||||
// the most common error will be invalid API key (401), so we handle this with a nice message
|
||||
if (error instanceof Anthropic.APIError && error.status === 401) {
|
||||
onError('Unauthorized: Invalid API key.')
|
||||
onError('Invalid API key.')
|
||||
}
|
||||
else {
|
||||
onError(error.message)
|
||||
|
|
@ -145,7 +145,7 @@ const sendOpenAIMsg: SendLLMMessageFnTypeInternal = ({ messages, onText, onFinal
|
|||
.catch(error => {
|
||||
if (error instanceof OpenAI.APIError) {
|
||||
if (error.status === 401) {
|
||||
onError('Unauthorized: Invalid API key.');
|
||||
onError('Invalid API key.');
|
||||
}
|
||||
else {
|
||||
onError(error.message);
|
||||
|
|
|
|||
Loading…
Reference in a new issue