Exception handling in rxjava
I am trying to get accustomed to rxjava and I am trying to call the below QuoteReader in an Observable. I am not sure how to handle the exception thrown, public class QuoteReader { public Map<String, Object> getQuote() throws IOException{ OkHttpClient okHttpClient = new OkHttpClient(); Request request = new Request.Builder().url("http://quotes.rest/qod.json").build(); Gson gson = new Gson(); Map<String, Object> responseMap = null; try(Response response = okHttpClient.newCall(request).execute()) { responseMap = gson.fromJson(response.body().string(), Map.class); System.out.println("response map