web3.storage icon indicating copy to clipboard operation
web3.storage copied to clipboard

Pinning - Refactor DB error handling

Open flea89 opened this issue 3 years ago • 3 comments

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.

flea89 avatar Dec 17 '21 12:12 flea89

Possible solutions:

  • Add Postgres DB error code to error object

mbommerez avatar Jan 28 '22 10:01 mbommerez

Removing this from the PSA Epic and adding as a separate item to the backlog.

mbommerez avatar Mar 07 '22 12:03 mbommerez

Discussed with @alanshaw . Probably needs to be looked at, but low priority for the moment.

mbommerez avatar Apr 29 '22 10:04 mbommerez