TIL, 2017-04-24
- Think about
github-ds
.
#### Benefits of Response Object
- Always returning the same object, avoiding nil and retaining duck typing.
- Can add context about the failure since it is a hash.
- Single place to update rescued exceptions if a new one pops up.
- Instrumentation/circuit breakers (?).
- Avoid using `begin` and `rescue` and use conditionals or whatever makes sense.
- Caller has ability to handle different failures differently (connection refused, timeout, rate limited...)