List of usage examples for com.google.api.client.googleapis.json GoogleJsonResponseException from
public static GoogleJsonResponseException from(JsonFactory jsonFactory, HttpResponse response)
From source file:google.registry.keyring.kms.GoogleJsonResponseExceptionHelper.java
License:Open Source License
/** * @param statusCode the status code that should be in the returned {@link * GoogleJsonResponseException}//from w ww .j a v a 2 s.c o m * @return a {@link GoogleJsonResponseException} with the status code {@code statusCode} * @throws IOException shouldn't occur */ public static GoogleJsonResponseException create(int statusCode) throws IOException { HttpResponse response = createHttpResponse(statusCode, null); return GoogleJsonResponseException.from(new JacksonFactory(), response); }