Python 2 is no longer supported by the community. We recommend that you migrate Python 2 apps to Python 3.

Exceptions

Caution: **This solution is no longer recommended:** Apps that use this API can only run in the Python 2 runtime and will need to upgrade to a [recommended solution](/appengine/docs/standard/python/migrate-to-python3/migrating-services#migration_paths_for_bundled_services) before migrating to the Python 3 runtime.

The Search API can raise the following exceptions:

Error

Base class for exceptions in this module.

PutError

The document could not be indexed.

InternalError

Search API call failed on internal backend.

DeleteError

The object could not be deleted.

TransientError

Search API call failed, but retrying may succeed.

InvalidRequest

Invalid search API call by client.