mlabs-haskell / ogmios-datum-cache

6 stars 4 forks source link

Add failed decoded datums to response #115

Closed t4ccer closed 2 years ago

t4ccer commented 2 years ago

(breaking change) https://github.com/mlabs-haskell/ogmios-datum-cache/pull/114#discussion_r931516021 It's necessary to know if requested datums failed to decode or somehow magically are not returned

Luis-omega commented 2 years ago

We have this proposal from @ngua in slack in case we change the API :

For the CTL changes, it would be great if we could somehow avoid making a breaking change to getDatumsByHashes. Perhaps we can do this:
- in `getDatumsByHashes`, throw an exception on the first error from ODC (so we can still return a Map DataHash Datum). We can add a deprecation notice using Warn to this and recommend people switch to `getDatumsByHashes`
- `getDatumsByHashes'` can use a new signature similar to the updated ODC one