momentohq / client-sdk-java

Official Java SDK for Momento Serverless Cache
Apache License 2.0
13 stars 5 forks source link

refactor: introduce `Store(Item)?NotFoundException` classes #360

Closed malandis closed 4 months ago

malandis commented 4 months ago

This PR detects when a NOT_FOUND gRPC error was specific to the storage client or not. For the storage client NOT_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.

malandis commented 4 months ago

Not terribly important or urgent: we may consider organizing the various not found exception classes as follows:

malandis commented 4 months ago

Naming choices I made: