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).

Hello, I encountered the error of errIndexingInProgress. Please retry when alter the schema. What is the cause of this? How should I avoid this problem?

1 Like

This means there’s an indexing in progress so alter operations are blocked. The fix is to wait. In later releases of Dgraph we index in the background.

2 Likes

Hi Martin,

When you say later releases do you mean in the future or are there versions that with that available now?

Thanks

Hey, nevermind. I was confused. Alters are always blocked until the indexing is finished. But in the current versions of Dgraph you can send mutations and queries while an indexing is in place. Before, mutations and queries were blocked while the indexing took place. This feature is available now.

Sorry for the confusion.