This repository has been archived on 2024-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
local-llm-server/llm_server/routes/server_error.py

9 lines
249 B
Python
Raw Normal View History

from llm_server.logging import create_logger
_logger = create_logger('handle_server_error')
def handle_server_error(e):
_logger.error(f'Internal Error: {e}')
return {'error': True, 'code': 500, 'message': 'Internal Server Error :('}, 500