Create subclasses of EntityManagerException for certain DatastoreExceptions.
Use the code from DatastoreException to throw a subclass EntityManagerException. Some useful exceptions would -
EntityAlreadyExistsException - if an attempt was made to insert a duplicate key
EntityNotFoundException - if an attempt was made to update a nonexistent entity
Create subclasses of EntityManagerException for certain DatastoreExceptions.
Use the code from DatastoreException to throw a subclass EntityManagerException. Some useful exceptions would -
EntityAlreadyExistsException - if an attempt was made to insert a duplicate key EntityNotFoundException - if an attempt was made to update a nonexistent entity
https://cloud.google.com/datastore/docs/concepts/errors https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto