def marqo_internal_exception_handler(request, exc: api_exceptions.MarqoError):
    """MarqoErrors are treated as internal errors"""

    headers = getattr(exc, "headers", None)
    body = {
        "message": exc.message,
        "code": 500,
        "type": "internal_error",
        "link": ""
    }
    if headers:
        return JSONResponse(content=body, status_code=500, headers=headers)
    else:
        return JSONResponse(content=body, status_code=500)
MarqoErrors are treated as internal errors
src/marqo/tensor_search/api.py