Python google.appengine.runtime.apiproxy_errors.CallNotFoundError() Examples

The following are code examples for showing how to use google.appengine.runtime.apiproxy_errors.CallNotFoundError(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: python-compat-runtime   Author: GoogleCloudPlatform   File:    Apache License 2.0 6 votes vote down vote up
def ExecuteRequest(self, request):
    """Executes an API invocation and returns the response object."""
    service = request.service_name()
    method = request.method()
    service_methods = SERVICE_PB_MAP.get(service, {})
    request_class, response_class = service_methods.get(method, (None, None))
    if not request_class:
      raise apiproxy_errors.CallNotFoundError()

    request_data = request_class()
    response_data = response_class()

    if service in self.LOCAL_STUBS:
      self.LOCAL_STUBS[service].MakeSyncCall(service, method, request_data,
      apiproxy_stub_map.MakeSyncCall(service, method, request_data,

    return response_data