Skip to content

Instantly share code, notes, and snippets.

@BrentonPoke
Created January 9, 2020 18:42
Show Gist options
  • Save BrentonPoke/59030e4447b07879b3900b274b38968a to your computer and use it in GitHub Desktop.
Save BrentonPoke/59030e4447b07879b3900b274b38968a to your computer and use it in GitHub Desktop.
if (response.code() != 200) {
Converter<ResponseBody, WeatherServiceException> errorConverter =
TestWeatherServiceGenerator.retrofit.responseBodyConverter(
WeatherServiceException.class, new Annotation[0]);
// Convert the error body into our Error type.
WeatherServiceException error = errorConverter.convert(response.errorBody());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment