TODO
Guardian/OneService class:
- exchangeToMono - if you care about the status code - return type will be ? extends throwable
- look at DownstreamExecutor
- onErrorResume have default exception that always pops up
strategy pattern:
- interface ie. callDownstream -> strategy that delegates to Guardian or One
- have 2 different strategies - guardian + something else (another api) + header // DONE
chain responsibility pattern:
- decorator for each api calls made
- 2 error handlers handing error responses from downstream ie. some error code will be handled differently between downstreams
- eg. 1 handler handles only 5xx, the other both
- look at SynacorStartTrackingHttpClientErrorHandler (calling to AbstractClass) -> not decorator pattern but similar idea
composition based stuff // https://github.com/matarrese/content-api-the-guardian - maybe use this?