Skip to content

Commit

Permalink
Fix the bug with incomplete error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Aug 8, 2024
1 parent 33bccc2 commit d738fa5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ async def new_generator():
return new_generator()
except StopAsyncIteration:
raise HTTPException(status_code=status_code, detail="data: {'error': 'No data returned'}")
except Exception as e:
logger.error(f"error_handling_wrapper Exception: {str(e)}")
import traceback
logger.error(f"error_handling_wrapper Exception: {traceback.print_exc()}")
raise HTTPException(status_code=status_code, detail="data: {'error': 'No data returned'}")

def post_all_models(token, config, api_list):
all_models = []
Expand Down

0 comments on commit d738fa5

Please sign in to comment.