mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-03 12:52:37 +02:00
feat: +exception catch
This commit is contained in:
parent
1903da126f
commit
2ba457a609
1 changed files with 6 additions and 0 deletions
|
|
@ -323,6 +323,12 @@ class OpenAIGPTAPI(BaseGPTAPI, RateLimiter):
|
|||
except openai.error.RateLimitError as e:
|
||||
logger.warning(f"Exception:{e}")
|
||||
continue
|
||||
except (openai.error.AuthenticationError,
|
||||
openai.error.PermissionError,
|
||||
openai.error.InvalidAPIType,
|
||||
openai.error.SignatureVerificationError) as e:
|
||||
logger.warning(f"Exception:{e}")
|
||||
raise e
|
||||
except Exception as e:
|
||||
error_str = traceback.format_exc()
|
||||
logger.error(f"Exception:{e}, stack:{error_str}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue