apache / couchdb-erlfdb

Erlang API for FoundationDB
https://www.foundationdb.org
Apache License 2.0
28 stars 20 forks source link

Add ERLFDB_IS_RETRYABLE/2 guard #21

Closed nickva closed 3 years ago

nickva commented 3 years ago

This is a guard which may be used to catch and handle retryable errors. It's more ergonomic as a guard than a function, since the handler won't have to catch and re-throw unwanted (non-retryable) exceptions.

Along with a guard, some common FDB error codes are also defined. It's not an exhaustive list and mostly consists of retryable and a few other common errors.