Should it be <code>if (e.getCause() != null && e.getCause() instanceof ServerError) </code> ?