I used the Databinder distribution library in the client for a simple REST-ish API. I know how to determine if I received an HTTP request with an error status:
Http x (request) { case (200, _, _, content) => successResult(content()) case (404, _, _, _) => notFoundErrorResult case (_, _, _, _) => genericErrorResult }
But how can I distinguish an error response from a refusal to receive any answer at all because of an invalid domain or inability to connect? And is there a way to implement a timeout when using synchronous semantics? If there is anything important in the API, I skipped it.
Eli bishop
source share