@Override public <T> T getEdge(final String key, final Class<T> type, final DocumentReadOptions options) throws ArangoDBException { try { return executor.execute(getEdgeRequest(key, options), getEdgeResponseDeserializer(type)); } catch (final ArangoDBException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(e.getMessage(), e); } return null; } }
@Override public <T> T getVertex(final String key, final Class<T> type, final DocumentReadOptions options) throws ArangoDBException { try { return executor.execute(getVertexRequest(key, options), getVertexResponseDeserializer(type)); } catch (final ArangoDBException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(e.getMessage(), e); } return null; } }
case ArangoErrors.ERROR_HTTP_UNAUTHORIZED: case ArangoErrors.ERROR_HTTP_FORBIDDEN: dae = new PermissionDeniedDataAccessException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_BAD_PARAMETER: case ArangoErrors.ERROR_HTTP_METHOD_NOT_ALLOWED: dae = new InvalidDataAccessApiUsageException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_NOT_FOUND: dae = new InvalidDataAccessResourceUsageException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_CONFLICT: dae = new DataIntegrityViolationException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_PRECONDITION_FAILED: case ArangoErrors.ERROR_HTTP_SERVICE_UNAVAILABLE: dae = new DataAccessResourceFailureException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_SERVER_ERROR: default: dae = new ArangoUncategorizedException(exception.getMessage(), exception); break;
case ArangoErrors.ERROR_HTTP_UNAUTHORIZED: case ArangoErrors.ERROR_HTTP_FORBIDDEN: dae = new PermissionDeniedDataAccessException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_BAD_PARAMETER: case ArangoErrors.ERROR_HTTP_METHOD_NOT_ALLOWED: dae = new InvalidDataAccessApiUsageException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_NOT_FOUND: dae = new InvalidDataAccessResourceUsageException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_CONFLICT: dae = new DataIntegrityViolationException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_PRECONDITION_FAILED: case ArangoErrors.ERROR_HTTP_SERVICE_UNAVAILABLE: dae = new DataAccessResourceFailureException(exception.getMessage(), exception); break; case ArangoErrors.ERROR_HTTP_SERVER_ERROR: default: dae = new ArangoUncategorizedException(exception.getMessage(), exception); break;
@Override public <T> T getVertex(final String key, final Class<T> type) throws ArangoDBException { try { return executor.execute(getVertexRequest(key, new DocumentReadOptions()), getVertexResponseDeserializer(type)); } catch (final ArangoDBException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(e.getMessage(), e); } return null; } }
@Override public <T> T getEdge(final String key, final Class<T> type) throws ArangoDBException { try { return executor.execute(getEdgeRequest(key, new DocumentReadOptions()), getEdgeResponseDeserializer(type)); } catch (final ArangoDBException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(e.getMessage(), e); } return null; } }
String errorMessage = ex.getMessage(); Matcher m = ERROR_CODE.matcher(errorMessage); if (m.matches()) {
@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; } }
.insertVertex(document); } catch (ArangoDBException e) { logger.error("Failed to insert document: {}", e.getMessage()); ArangoDBGraphException arangoDBException = ArangoDBExceptions.getArangoDBException(e); if (arangoDBException.getCode() == 1210) {