web3.storage
web3.storage copied to clipboard
Pinning - Refactor DB error handling
At the moment it is pretty difficult to discriminate between different DBError messages.
Within our DBClient if an error occurs we generally raise a DBError
.
DBError
has always code 'ERROR_DB
and it doesn't store the actual DBError so it's impossible for client code to catch different types of error.
We should make sure the Postgrest code is store in the error or even better, create different errors based on that code.
Possible solutions:
- Add Postgres DB error code to error object
Removing this from the PSA Epic and adding as a separate item to the backlog.
Discussed with @alanshaw . Probably needs to be looked at, but low priority for the moment.