web3-storage / web3.storage

DEPRECATED ⁂ The simple file storage service for IPFS & Filecoin
https://web3.storage
Other
502 stars 121 forks source link

Pinning - Refactor DB error handling #813

Open flea89 opened 2 years ago

flea89 commented 2 years ago

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.

mbommerez commented 2 years ago

Possible solutions:

mbommerez commented 2 years ago

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

mbommerez commented 2 years ago

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