code: def handle_exception(datasette, request, exception):
      datasette._exception_hook_fired = (request, exception)
      if request.args.get("_custom_error"):
          return Response.text("_custom_error")
      elif request.args.get("_custom_error_async"):
  
          async def inner():
              return Response.text("_custom_error_async")
  
          return inner
  
file_path: datasette/tests/plugins/my_plugin_2.py
imports: from datasette import hookimpl
  from datasette.utils.asgi import Response
  from functools import wraps
  import markupsafe
  import json
label_desc: Use image node_id 13 for calling a global function with example usage: handle_exception(datasette, request, exception) and returns: Response, inner, Response