6 comments

[ 7.8 ms ] story [ 28.3 ms ] thread
(comment deleted)
I’ve read the readme 3 times and I still don’t understand what it is … it looks like someone learning effect systems but not quite there yet !?
From what I can tell it is a library for standardising return values that is independent on the transport medium. A HTTP service may return a particular http code or body, and gRPC would have its own representation.

I think this library maps the different representations into a single representation.

Example from the docs:

    PAYMENT_DECLINED
    |
    +-- HTTP 422
    +-- gRPC FAILED_PRECONDITION
    +-- logs/metrics keep PAYMENT_DECLINED
Result<T> { String resultCode; T data; List<String> errors; }
Title can be "Codes - typed application return values for Kotlin and Java".