def _ToBlobstoreError(error):
  error_map = {
      blobstore_service_pb.BlobstoreServiceError.INTERNAL_ERROR:
      InternalError,
      }

  if error.application_error in error_map:
    return error_map[error.application_error](error.error_detail)
  else:
    return error
Translate an application error to a datastore Error, if possible.
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/api/blobstore/blobstore.py/_ToBlobstoreError