Skip to content

Commit deb1836

Browse files
author
michele
committed
bugfix transaction not found handling
1 parent 2939411 commit deb1836

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/com/arangodb/internal/ArangoCollectionImpl.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ public <T> T getDocument(final String key, final Class<T> type, final DocumentRe
108108
if (LOGGER.isDebugEnabled()) {
109109
LOGGER.debug(e.getMessage(), e);
110110
}
111+
112+
// handle Response: 404, Error: 1655 - transaction not found
113+
if (e.getErrorNum() != null && e.getErrorNum() == 1655) {
114+
throw e;
115+
}
116+
111117
if ((e.getResponseCode() != null && (e.getResponseCode() == 404 || e.getResponseCode() == 304
112118
|| e.getResponseCode() == 412)) && (options == null || options.isCatchException())) {
113119
return null;
@@ -218,6 +224,12 @@ public Boolean documentExists(final String key, final DocumentExistsOptions opti
218224
executor.execute(documentExistsRequest(key, options), VPackSlice.class);
219225
return true;
220226
} catch (final ArangoDBException e) {
227+
228+
// handle Response: 404, Error: 1655 - transaction not found
229+
if (e.getErrorNum() != null && e.getErrorNum() == 1655) {
230+
throw e;
231+
}
232+
221233
if ((e.getResponseCode() != null && (e.getResponseCode() == 404 || e.getResponseCode() == 304
222234
|| e.getResponseCode() == 412)) && (options == null || options.isCatchException())) {
223235
return false;

0 commit comments

Comments
 (0)