Closed malandis closed 4 months ago
Not terribly important or urgent: we may consider organizing the various not found
exception classes as follows:
ResourceNotFoundException
, with subclassesCacheResourceNotFoundException
and StoreResourceNotFoundException
StoreItemNotFoundException
and StoreNotFoundException
Naming choices I made:
StoreNotFoundException
for when a store is not foundStoreItemNotFoundException
for when the item is not found. I feel that prefixing with Store
reduces ambiguity vs a cache item for users typing in an IDE. Alternatively we could use StorageItemNotFoundException
which, while better English, leaves the prefix inconsistent. For grouping purposes a single prefix is a more convenient DX.
This PR detects when a
NOT_FOUND
gRPC error was specific to the storage client or not. For the storage clientNOT_FOUND
, there are two cases: the store was not found and the item was not found.To distinguish these two cases we use string matching on the grpcException message.