code: def safe_call(request: Request, methods: Methods, *, debug: bool) -> Response:
      
      with handle_exceptions(request, debug) as handler:
          result = call(methods.items[request.method], *request.args, **request.kwargs)
          handler.response = SuccessResponse(result=result, id=request.id)
      return handler.response
docs: Call a Request, catching exceptions to ensure we always return a Response.
  
      Args:
          request: The Request object.
          methods: The list of methods that can be called.
          debug: Include more information in error responses.
  
      Returns:
          A Response object.