* The error from Riak
* @return a {@link RiakException} as specific as possible
* @throws IOException
*/
public static RiakException parseException(final String json) {
RiakException ex = null;
try {
Map<String, String> exceptionData = parseError(json);
if (isTimeoutError(exceptionData)) {
ex = new MapReduceTimeoutException();
} else {
ex = new RiakException(json);
}
} catch (IOException e) {
ex = new RiakException(new StringBuilder().append(json).append(PARSE_ERROR).toString(), e);
}
return ex;
}