code: def exception_schema(
      ex: t.Type[BentoMLException],
  ) -> t.Iterable[FilledExceptionSchema]:
      # convert BentoML exception to OpenAPI components schema
      error_properties = {
          "msg": Schema(title="Message", type="string"),
          "type": Schema(title="Error Type", type="string"),
      }
  
      yield FilledExceptionSchema(
          title=ex.__name__,
          type="object",
          description=ex.error_code.phrase,
          properties=error_properties,
          required=list(error_properties),
      )
  
file_path: BentoML/grpc-client/bentoml/_internal/service/openapi/utils.py
imports: from __future__ import annotations
  import typing
  from functools import lru_cache
  from typing import TYPE_CHECKING
  from bentoml.exceptions import InternalServerError
  from bentoml.exceptions import InvalidArgument
  from bentoml.exceptions import NotFound
  from ...utils import LazyLoader
  from ...utils.pkg import pkg_version_info
  from .specification import Schema
label_desc: Use image node_id 5 for calling a global function with example usage: exception_schema(ex) without return types