docs: def handle_api_exception(error):
      """
      Converts an API exception into an error response.
      """
      _mp_track(
          type="exception",
          status_code=error.status_code,
          message=error.message,
      )
  
      response = jsonify(dict(
          message=error.message
      ))
      response.status_code = error.status_code
      return response