def exception_handler()

in aidial_adapter_dial/app.py [0:0]


def exception_handler(request: Request, e: Exception):
    log.exception(f"caught exception: {type(e).__module__}.{type(e).__name__}")
    dial_exception = to_dial_exception(e)
    fastapi_response = dial_exception.to_fastapi_response()
    return fastapi_response