File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
core/src/main/java/com/arangodb/internal Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 3232import java .util .concurrent .CompletableFuture ;
3333import java .util .concurrent .CompletionException ;
3434
35+ import static com .arangodb .internal .ArangoErrors .ERROR_GRAPH_NOT_FOUND ;
36+
3537public class ArangoGraphAsyncImpl extends InternalArangoGraph implements ArangoGraphAsync {
3638
3739 private final ArangoDatabaseAsync db ;
@@ -54,7 +56,7 @@ public CompletableFuture<Boolean> exists() {
5456 Throwable e = err instanceof CompletionException ? err .getCause () : err ;
5557 if (e instanceof ArangoDBException ) {
5658 ArangoDBException aEx = (ArangoDBException ) e ;
57- if (ArangoErrors .ERROR_GRAPH_NOT_FOUND . equals (aEx . getErrorNum () )) {
59+ if (ArangoErrors .matches (aEx , 404 , ERROR_GRAPH_NOT_FOUND )) {
5860 return false ;
5961 }
6062 }
Original file line number Diff line number Diff line change 2929
3030import java .util .Collection ;
3131
32+ import static com .arangodb .internal .ArangoErrors .ERROR_GRAPH_NOT_FOUND ;
33+ import static com .arangodb .internal .ArangoErrors .matches ;
34+
3235/**
3336 * @author Mark Vollmary
3437 */
@@ -52,7 +55,7 @@ public boolean exists() {
5255 getInfo ();
5356 return true ;
5457 } catch (final ArangoDBException e ) {
55- if (ArangoErrors . ERROR_GRAPH_NOT_FOUND . equals ( e . getErrorNum () )) {
58+ if (matches ( e , 404 , ERROR_GRAPH_NOT_FOUND )) {
5659 return false ;
5760 }
5861 throw e ;
You can’t perform that action at this time.
0 commit comments