@Override public Boolean documentExists(final String key, final DocumentExistsOptions options) throws ArangoDBException { try { executor.execute(documentExistsRequest(key, options), VPackSlice.class); return true; } catch (final ArangoDBException e) { if ((e.getResponseCode() != null && (e.getResponseCode().intValue() == 404 || e.getResponseCode().intValue() == 304 || e.getResponseCode().intValue() == 412)) && (options == null || options.isCatchException())) { return false; } throw e; } }
@Override public <T> T getDocument(final String key, final Class<T> type, final DocumentReadOptions options) throws ArangoDBException { DocumentUtil.validateDocumentKey(key); try { return executor.execute(getDocumentRequest(key, options), type); } catch (final ArangoDBException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(e.getMessage(), e); } if ((e.getResponseCode() != null && (e.getResponseCode().intValue() == 404 || e.getResponseCode().intValue() == 304 || e.getResponseCode().intValue() == 412)) && (options == null || options.isCatchException())) { return null; } throw e; } }
final Integer responseCode = e.getResponseCode(); if (responseCode != null && responseCode == 403) { response = Collections.<String> emptyList();
} else if (ex instanceof ArangoDBException) { final ArangoDBException exception = ArangoDBException.class.cast(ex); final Integer responseCode = exception.getResponseCode(); if (responseCode != null) { switch (responseCode) {
} else if (ex instanceof ArangoDBException) { final ArangoDBException exception = ArangoDBException.class.cast(ex); final Integer responseCode = exception.getResponseCode(); if (responseCode != null) { switch (responseCode) {