grumlin 0.22.1 → 0.22.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/grumlin/request_error_factory.rb +16 -2
- data/lib/grumlin/version.rb +1 -1
- data/lib/grumlin.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23a0ce8dacaf7c4add38674353e6aa69e51ebd9865ed83c3112f62ad96a5d213
|
4
|
+
data.tar.gz: 775c7c6009e6969d9a2b060772dc5d6caf9846267050509a5aeccf1bd5050e0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b9a820912679a67ca1be3545130ee3affcf89bea1bd9085a47f18d4b0c2ed6583ebfe5e7c52c339d93efe672d7ec7d5e604a68681581a4c57f6b21d8dce9e21
|
7
|
+
data.tar.gz: a5d371995de61123f954361143f98427af0109831c189bb1ad60cdf722109c72749872478096aa60de22bc7d3139825fdf1ed07c8cce2330eca51cb5865fc6f9
|
data/Gemfile.lock
CHANGED
@@ -18,11 +18,19 @@ module Grumlin
|
|
18
18
|
# {"detailedMessage":"",
|
19
19
|
# "requestId":"UUID",
|
20
20
|
# "code":"ConcurrentModificationException"}
|
21
|
-
#
|
21
|
+
# Currently we simply search for substrings to identify the exact error
|
22
22
|
# TODO: parse json and use `code` instead
|
23
|
+
|
23
24
|
VERTEX_ALREADY_EXISTS = "Vertex with id already exists:"
|
24
25
|
EDGE_ALREADY_EXISTS = "Edge with id already exists:"
|
26
|
+
|
25
27
|
CONCURRENT_VERTEX_INSERT_FAILED = "Failed to complete Insert operation for a Vertex due to conflicting concurrent"
|
28
|
+
|
29
|
+
CONCURRENT_VERTEX_PROPERTY_INSERT_FAILED =
|
30
|
+
"Failed to complete Insert operation for a VertexProperty due to conflicting concurrent"
|
31
|
+
CONCURRENT_EDGE_PROPERTY_INSERT_FAILED =
|
32
|
+
"Failed to complete Insert operation for a EdgeProperty due to conflicting concurrent"
|
33
|
+
|
26
34
|
CONCURRENT_EDGE_INSERT_FAILED = "Failed to complete Insert operation for an Edge due to conflicting concurrent"
|
27
35
|
CONCURRENCT_MODIFICATION_FAILED = "Failed to complete operation due to conflicting concurrent"
|
28
36
|
|
@@ -49,9 +57,15 @@ module Grumlin
|
|
49
57
|
return EdgeAlreadyExistsError if status[:message]&.include?(EDGE_ALREADY_EXISTS)
|
50
58
|
end
|
51
59
|
|
52
|
-
def concurrent_modification_error(status)
|
60
|
+
def concurrent_modification_error(status) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
53
61
|
return ConcurrentVertexInsertFailedError if status[:message]&.include?(CONCURRENT_VERTEX_INSERT_FAILED)
|
62
|
+
if status[:message]&.include?(CONCURRENT_VERTEX_PROPERTY_INSERT_FAILED)
|
63
|
+
return ConcurrentVertexPropertyInsertFailedError
|
64
|
+
end
|
54
65
|
return ConcurrentEdgeInsertFailedError if status[:message]&.include?(CONCURRENT_EDGE_INSERT_FAILED)
|
66
|
+
if status[:message]&.include?(CONCURRENT_EDGE_PROPERTY_INSERT_FAILED)
|
67
|
+
return ConcurrentEdgePropertyInsertFailedError
|
68
|
+
end
|
55
69
|
return ConcurrentModificationError if status[:message]&.include?(CONCURRENCT_MODIFICATION_FAILED)
|
56
70
|
end
|
57
71
|
end
|
data/lib/grumlin/version.rb
CHANGED
data/lib/grumlin.rb
CHANGED
@@ -107,6 +107,9 @@ module Grumlin
|
|
107
107
|
class ConcurrentVertexInsertFailedError < ConcurrentInsertFailedError; end
|
108
108
|
class ConcurrentEdgeInsertFailedError < ConcurrentInsertFailedError; end
|
109
109
|
|
110
|
+
class ConcurrentVertexPropertyInsertFailedError < ConcurrentInsertFailedError; end
|
111
|
+
class ConcurrentEdgePropertyInsertFailedError < ConcurrentInsertFailedError; end
|
112
|
+
|
110
113
|
class ServerSerializationError < ServerSideError; end
|
111
114
|
|
112
115
|
class ServerTimeoutError < ServerSideError; end
|