/** * Create a StreamException based on the RestException * @param restException the rest Exception * @return the StreamException that's created based on rest exception */ public static StreamException toStreamException(final RestException restException) { return new StreamException(toStreamResponse(restException.getResponse()), restException.getMessage(), restException.getCause()); }