App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.tools.devappserver2.endpoints.errors.RequestError Class Reference
Inheritance diagram for google.appengine.tools.devappserver2.endpoints.errors.RequestError:
google.appengine.tools.devappserver2.endpoints.errors.BackendError google.appengine.tools.devappserver2.endpoints.errors.RequestRejectionError google.appengine.tools.devappserver2.endpoints.errors.InvalidParameterError google.appengine.tools.devappserver2.endpoints.errors.BasicTypeParameterError google.appengine.tools.devappserver2.endpoints.errors.EnumRejectionError

Public Member Functions

def status_code
 
def message
 
def reason
 
def domain
 
def extra_fields
 
def rest_error
 
def rpc_error
 

Detailed Description

Base class for errors that happen while processing a request.

Member Function Documentation

def google.appengine.tools.devappserver2.endpoints.errors.RequestError.domain (   self)
Get the domain for this error.

Returns:
  The string 'global' by default.  Subclasses can override this if they have
  a different domain.
def google.appengine.tools.devappserver2.endpoints.errors.RequestError.extra_fields (   self)
Return a dict of extra fields to add to the error response.

Some errors have additional information.  This provides a way for subclasses
to provide that information.

Returns:
  None, by default.  Subclasses can return a dict with values to add
  to the error response.
def google.appengine.tools.devappserver2.endpoints.errors.RequestError.message (   self)
Text message explaining the error.

Subclasses must implement this, returning a string that explains the
error.

Raises:
  NotImplementedError: Subclasses must override this function.
def google.appengine.tools.devappserver2.endpoints.errors.RequestError.reason (   self)
Get the reason for the error.

Error reason is a custom string in the Cloud Endpoints server.  When
possible, this should match the reason that the live server will generate,
based on the error's status code.  If this returns None, the error formatter
will attempt to generate a reason from the status code.

Returns:
  None, by default.  Subclasses can override this if they have a specific
  error reason.
def google.appengine.tools.devappserver2.endpoints.errors.RequestError.rest_error (   self)
Format this error into a response to a REST request.

Returns:
  A string containing the reformatted error response.
def google.appengine.tools.devappserver2.endpoints.errors.RequestError.rpc_error (   self)
Format this error into a response to a JSON RPC request.


Returns:
  A dict containing the reformatted JSON error response.
def google.appengine.tools.devappserver2.endpoints.errors.RequestError.status_code (   self)
HTTP status code number associated with this error.

Subclasses must implement this, returning an integer with the status
code number for the error.

Example: 400

Raises:
  NotImplementedError: Subclasses must override this function.

The documentation for this class was generated from the following file: