google-cloud-errors 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ab6400a7d633ba4c9bb30de49bc2b23a5824530fa02a1f88aa151ff328487ab
4
- data.tar.gz: 77459bb92f7408eb68b9d02ed6b96cd4d3f183d213c27b1eac36086129957424
3
+ metadata.gz: 3a06a5f75a20d7ec47007bdd168a5273767715a66e64ab947d6bb6998b8d5b5a
4
+ data.tar.gz: cee042f51d100006589bbe5ae8b0fc3c57a88f5378fd8d207f47217e62320e59
5
5
  SHA512:
6
- metadata.gz: f9cbd068fecd4fa411fd008bc519460366900be46f774ead0c5e92b399f46c8ec1f9cf02e2971dafdc86106f177e48073720faf2a6135c09f8bc80bf8eded0e6
7
- data.tar.gz: 5f54fe580d61ce5e0d1b80b13a461e3d299c888e770646328df796e662093c0e1a1cfae1996a3b5c91307673e372400f267caa0d0bb54c67c5d1fbdb51947b10
6
+ metadata.gz: 656ca8f8851552a6617e4e9fc331a955074cbd5edcbbd315765d6e1d6c8bb80068e4ee75b89027efb0829eb200bc03ebbe6d345be9848d0a2bf01352fbf946ec
7
+ data.tar.gz: 5c9c995421d9532dec9bc7fc599ea796a3298c0dea8ba62f4fd7d6e07a25a193fdcbecfdeadaeeb9052495e6465ad2184143a2b92e9ef6f804f284ada06ae467
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Errors
19
- VERSION = "1.3.0".freeze
19
+ VERSION = "1.3.1".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -231,6 +231,13 @@ module Google
231
231
  ##
232
232
  # Canceled indicates the operation was cancelled (typically by the caller).
233
233
  class CanceledError < Error
234
+ ##
235
+ # gRPC error code for CANCELLED
236
+ #
237
+ # @return [Integer]
238
+ def code
239
+ 1
240
+ end
234
241
  end
235
242
 
236
243
  ##
@@ -240,6 +247,13 @@ module Google
240
247
  # errors raised by APIs that do not return enough error information
241
248
  # may be converted to this error.
242
249
  class UnknownError < Error
250
+ ##
251
+ # gRPC error code for UNKNOWN
252
+ #
253
+ # @return [Integer]
254
+ def code
255
+ 2
256
+ end
243
257
  end
244
258
 
245
259
  ##
@@ -248,6 +262,13 @@ module Google
248
262
  # that are problematic regardless of the state of the system
249
263
  # (e.g., a malformed file name).
250
264
  class InvalidArgumentError < Error
265
+ ##
266
+ # gRPC error code for INVALID_ARGUMENT
267
+ #
268
+ # @return [Integer]
269
+ def code
270
+ 3
271
+ end
251
272
  end
252
273
 
253
274
  ##
@@ -257,18 +278,39 @@ module Google
257
278
  # example, a successful response from a server could have been delayed
258
279
  # long enough for the deadline to expire.
259
280
  class DeadlineExceededError < Error
281
+ ##
282
+ # gRPC error code for DEADLINE_EXCEEDED
283
+ #
284
+ # @return [Integer]
285
+ def code
286
+ 4
287
+ end
260
288
  end
261
289
 
262
290
  ##
263
291
  # NotFound means some requested entity (e.g., file or directory) was
264
292
  # not found.
265
293
  class NotFoundError < Error
294
+ ##
295
+ # gRPC error code for NOT_FOUND
296
+ #
297
+ # @return [Integer]
298
+ def code
299
+ 5
300
+ end
266
301
  end
267
302
 
268
303
  ##
269
304
  # AlreadyExists means an attempt to create an entity failed because one
270
305
  # already exists.
271
306
  class AlreadyExistsError < Error
307
+ ##
308
+ # gRPC error code for ALREADY_EXISTS
309
+ #
310
+ # @return [Integer]
311
+ def code
312
+ 6
313
+ end
272
314
  end
273
315
 
274
316
  ##
@@ -279,12 +321,26 @@ module Google
279
321
  # used if the caller cannot be identified (use Unauthenticated
280
322
  # instead for those errors).
281
323
  class PermissionDeniedError < Error
324
+ ##
325
+ # gRPC error code for PERMISSION_DENIED
326
+ #
327
+ # @return [Integer]
328
+ def code
329
+ 7
330
+ end
282
331
  end
283
332
 
284
333
  ##
285
334
  # ResourceExhausted indicates some resource has been exhausted, perhaps
286
335
  # a per-user quota, or perhaps the entire file system is out of space.
287
336
  class ResourceExhaustedError < Error
337
+ ##
338
+ # gRPC error code for RESOURCE_EXHAUSTED
339
+ #
340
+ # @return [Integer]
341
+ def code
342
+ 8
343
+ end
288
344
  end
289
345
 
290
346
  ##
@@ -308,6 +364,13 @@ module Google
308
364
  # server does not match the condition. E.g., conflicting
309
365
  # read-modify-write on the same resource.
310
366
  class FailedPreconditionError < Error
367
+ ##
368
+ # gRPC error code for FAILED_PRECONDITION
369
+ #
370
+ # @return [Integer]
371
+ def code
372
+ 9
373
+ end
311
374
  end
312
375
 
313
376
  ##
@@ -318,6 +381,13 @@ module Google
318
381
  # See litmus test above for deciding between FailedPrecondition,
319
382
  # Aborted, and Unavailable.
320
383
  class AbortedError < Error
384
+ ##
385
+ # gRPC error code for ABORTED
386
+ #
387
+ # @return [Integer]
388
+ def code
389
+ 10
390
+ end
321
391
  end
322
392
 
323
393
  ##
@@ -337,12 +407,26 @@ module Google
337
407
  # a space can easily look for an OutOfRange error to detect when
338
408
  # they are done.
339
409
  class OutOfRangeError < Error
410
+ ##
411
+ # gRPC error code for OUT_OF_RANGE
412
+ #
413
+ # @return [Integer]
414
+ def code
415
+ 11
416
+ end
340
417
  end
341
418
 
342
419
  ##
343
420
  # Unimplemented indicates operation is not implemented or not
344
421
  # supported/enabled in this service.
345
422
  class UnimplementedError < Error
423
+ ##
424
+ # gRPC error code for UNIMPLEMENTED
425
+ #
426
+ # @return [Integer]
427
+ def code
428
+ 12
429
+ end
346
430
  end
347
431
 
348
432
  ##
@@ -350,6 +434,13 @@ module Google
350
434
  # system has been broken. If you see one of these errors,
351
435
  # something is very broken.
352
436
  class InternalError < Error
437
+ ##
438
+ # gRPC error code for INTERNAL
439
+ #
440
+ # @return [Integer]
441
+ def code
442
+ 13
443
+ end
353
444
  end
354
445
 
355
446
  ##
@@ -360,17 +451,38 @@ module Google
360
451
  # See litmus test above for deciding between FailedPrecondition,
361
452
  # Aborted, and Unavailable.
362
453
  class UnavailableError < Error
454
+ ##
455
+ # gRPC error code for UNAVAILABLE
456
+ #
457
+ # @return [Integer]
458
+ def code
459
+ 14
460
+ end
363
461
  end
364
462
 
365
463
  ##
366
464
  # DataLoss indicates unrecoverable data loss or corruption.
367
465
  class DataLossError < Error
466
+ ##
467
+ # gRPC error code for DATA_LOSS
468
+ #
469
+ # @return [Integer]
470
+ def code
471
+ 15
472
+ end
368
473
  end
369
474
 
370
475
  ##
371
476
  # Unauthenticated indicates the request does not have valid
372
477
  # authentication credentials for the operation.
373
478
  class UnauthenticatedError < Error
479
+ ##
480
+ # gRPC error code for UNAUTHENTICATED
481
+ #
482
+ # @return [Integer]
483
+ def code
484
+ 16
485
+ end
374
486
  end
375
487
  end
376
488
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-09-13 00:00:00.000000000 Z
12
+ date: 2023-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: autotest-suffix
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  requirements: []
189
- rubygems_version: 3.3.14
189
+ rubygems_version: 3.4.2
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Error classes for google-cloud-ruby