ndb 1.13.2 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ndb/errors.rb +59 -1
- data/lib/ndb/version.rb +1 -1
- 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: 93cdea704230998affb631c26c1e58c25fb7780d04931dbc9a922c939f24de99
|
|
4
|
+
data.tar.gz: ee1d7ba1a796530dda545c5076aab587b4512cab13c47d3eba4290e19d1c992e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 845cb4a57d3637bbe59978997f123c0ece7b6bbbc39136499e5e3e315384db3a4f80b4554a7e4c1d7f61b3f36b1f6e2517023f8406307ff23f463b2ec41fa6aa
|
|
7
|
+
data.tar.gz: 5cb673f8fb02a3c10be40af8b084997dd12ce21aab3f09ce0ad0ca5c8fb4e2dd9b041c5f86527e56f958166ac4eab9d69f029b5b949130638e5e3eb9b386e43d
|
data/lib/ndb/errors.rb
CHANGED
|
@@ -68,6 +68,41 @@ module Ndb
|
|
|
68
68
|
# attaches too many documents.
|
|
69
69
|
class LookupError < Error; end
|
|
70
70
|
|
|
71
|
+
# The daemon refused a token for this route, or a route over TCP.
|
|
72
|
+
class Forbidden < Error; end
|
|
73
|
+
|
|
74
|
+
# A document, an id, a batch, a path or an index definition is not valid.
|
|
75
|
+
class InvalidDocument < Error; end
|
|
76
|
+
|
|
77
|
+
# A collection pattern that is not valid, a write on one, or one that
|
|
78
|
+
# matches too many collections.
|
|
79
|
+
class InvalidPattern < Error; end
|
|
80
|
+
|
|
81
|
+
# The route does not exist for a direct-mode collection.
|
|
82
|
+
class NotSupported < Error; end
|
|
83
|
+
|
|
84
|
+
# The blob reference is not sha256:<64 hex>.
|
|
85
|
+
class InvalidBlobRef < Error; end
|
|
86
|
+
|
|
87
|
+
# No route has this path, or not with this method.
|
|
88
|
+
class UnknownRoute < Error; end
|
|
89
|
+
|
|
90
|
+
# The group table of an aggregate is over its memory limit.
|
|
91
|
+
class GroupLimitExceeded < Error; end
|
|
92
|
+
|
|
93
|
+
# The body or one line is over max_line_size (or the blob limit).
|
|
94
|
+
class RequestTooLarge < Error; end
|
|
95
|
+
|
|
96
|
+
# The watch position is not valid.
|
|
97
|
+
class InvalidPosition < Error; end
|
|
98
|
+
|
|
99
|
+
# The daemon is shutting down (HTTP 503). Not retried by the client: the
|
|
100
|
+
# request may have been taken, unlike NotReady.
|
|
101
|
+
class Closed < Error; end
|
|
102
|
+
|
|
103
|
+
# A bug or a disk error in the daemon; the message is in its log.
|
|
104
|
+
class Internal < Error; end
|
|
105
|
+
|
|
71
106
|
# The daemon error code -> the Ruby class.
|
|
72
107
|
CODE_TO_ERROR = {
|
|
73
108
|
"unauthorized" => Unauthorized,
|
|
@@ -100,7 +135,30 @@ module Ndb
|
|
|
100
135
|
"pitr_off" => PitrOff,
|
|
101
136
|
"lookup_invalid" => LookupError,
|
|
102
137
|
"lookup_unindexed" => LookupError,
|
|
103
|
-
"lookup_too_large" => LookupError
|
|
138
|
+
"lookup_too_large" => LookupError,
|
|
139
|
+
"invalid_pipeline" => InvalidQuery,
|
|
140
|
+
"forbidden" => Forbidden,
|
|
141
|
+
"invalid_doc" => InvalidDocument,
|
|
142
|
+
"missing_id" => InvalidDocument,
|
|
143
|
+
"invalid_id" => InvalidDocument,
|
|
144
|
+
"immutable_id" => InvalidDocument,
|
|
145
|
+
"invalid_batch" => InvalidDocument,
|
|
146
|
+
"invalid_path" => InvalidDocument,
|
|
147
|
+
"invalid_index" => InvalidDocument,
|
|
148
|
+
"invalid_pattern" => InvalidPattern,
|
|
149
|
+
"pattern_read_only" => InvalidPattern,
|
|
150
|
+
"pattern_too_wide" => InvalidPattern,
|
|
151
|
+
"not_supported" => NotSupported,
|
|
152
|
+
"invalid_blob_ref" => InvalidBlobRef,
|
|
153
|
+
"unknown_route" => UnknownRoute,
|
|
154
|
+
"method_not_allowed" => UnknownRoute,
|
|
155
|
+
"group_limit_exceeded" => GroupLimitExceeded,
|
|
156
|
+
"request_too_large" => RequestTooLarge,
|
|
157
|
+
"line_too_large" => RequestTooLarge,
|
|
158
|
+
"invalid_position" => InvalidPosition,
|
|
159
|
+
"closed" => Closed,
|
|
160
|
+
"stopping" => Closed,
|
|
161
|
+
"internal" => Internal
|
|
104
162
|
}.freeze
|
|
105
163
|
|
|
106
164
|
def self.error_for(code, message, status)
|
data/lib/ndb/version.rb
CHANGED