catch error from proxy server
This commit is contained in:
parent
7ef8f8e129
commit
5b6efbe067
5 changed files with 7 additions and 3 deletions
|
|
@ -2,6 +2,8 @@ from functools import cached_property
|
|||
import traceback
|
||||
import time
|
||||
from typing import Any, Callable, Coroutine, Dict, List
|
||||
|
||||
from aiohttp import ClientPayloadError
|
||||
from ..models.filesystem_edit import FileEditWithFullContents
|
||||
from ..libs.llm import LLM
|
||||
from .observation import Observation, InternalErrorObservation
|
||||
|
|
@ -27,6 +29,8 @@ def get_error_title(e: Exception) -> str:
|
|||
return "OpenAI timed out. Please try again."
|
||||
elif isinstance(e, openai_errors.InvalidRequestError) and e.code == "context_length_exceeded":
|
||||
return e._message
|
||||
elif isinstance(e, ClientPayloadError):
|
||||
return "The request to OpenAI failed. Please try again."
|
||||
return e.__repr__()
|
||||
|
||||
|
||||
|
|
|
|||
4
extension/package-lock.json
generated
4
extension/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.0.65",
|
||||
"version": "0.0.67",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.0.65",
|
||||
"version": "0.0.67",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"displayName": "Continue",
|
||||
"pricing": "Free",
|
||||
"description": "Accelerating software development with language models",
|
||||
"version": "0.0.65",
|
||||
"version": "0.0.67",
|
||||
"publisher": "Continue",
|
||||
"engines": {
|
||||
"vscode": "^1.74.0"
|
||||
|
|
|
|||
0
extension/scripts/.continue_env_installed
Normal file
0
extension/scripts/.continue_env_installed
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue