Better pydgraph errors

I am working on having better exceptions for the pydgraph client. However, I am not sure which errors I should include. Here’s a list of possible errors.

Retriable errors

  • Pending transactions found. Please retry operation
  • errIndexingInProgress. Please retry
  • Transaction has been aborted. Please retry
  • Server overloaded with pending proposals. Please retry later.
  • Please retry again, server is not ready to accept requests
  • Invalid Zero received AssignUids request forward. Please retry
  • operation opIndexing is already running.

Connection errors.

  • This category should include errors that happen when the grpc connection is unavailable. I guess they are also retryable errors but users might want to know when a server is not available or reachable.

@dmai: Is there any other error or category you think I am missing?

There can be errors related to the txn setup, like trying to run a mutation on read-only or best-effort txns, running operations on an already-finished transaction, or errors around the internal state of the txn (conflict keys, StartTs mismatch). These errors are raised locally within the client.

The client could also return errors related to ACLs (e.g., not being able to login or the token expiring).