code: def test_default_error_handling(serve_instance):
      @serve.deployment
      def f():
          1 / 0
  
      serve.run(f.bind())
      r = requests.get("http://localhost:8000/f")
      assert r.status_code == 500
      assert "ZeroDivisionError" in r.text, r.text
  
      @ray.remote(num_cpus=0)
      def intentional_kill(actor_handle):
          ray.kill(actor_handle, no_restart=False)
  
      @serve.deployment
      def h():
          ray.get(
              intentional_kill.remote(
                  ray.get_runtime_context().current_actor
              )
          )
          time.sleep(
              100
          )  # Don't return here to leave time for actor exit.
  
      serve.run(h.bind())
      r = requests.get("http://localhost:8000/h")
      assert r.status_code == 500
  
file_path: ray/python/ray/serve/tests/test_http_routes.py
imports: import time
  import pytest
  import requests
  from fastapi import FastAPI, Request
  from starlette.responses import RedirectResponse
  import ray
  from ray import serve
  from ray.serve._private.constants import SERVE_DEFAULT_APP_NAME
label_desc: Use image node_id 8 for calling a global function with example usage: test_default_error_handling(serve_instance) without return types