@@ -10,7 +10,10 @@ pub struct GetObjectRequest {
10
10
/// Authorization and billing can also be performed at the `store_id` level.
11
11
#[ prost( string, tag = "1" ) ]
12
12
pub store_id : :: prost:: alloc:: string:: String ,
13
- /// `Key` for which the value is to be fetched.
13
+ /// The key of the value to be fetched.
14
+ ///
15
+ /// If the specified `key` does not exist, returns `ErrorCode.NO_SUCH_KEY_EXCEPTION` in the
16
+ /// the `ErrorResponse`.
14
17
///
15
18
/// Consistency Guarantee:
16
19
/// Get(read) operations against a `key` are consistent reads and will reflect all previous writes,
@@ -287,17 +290,19 @@ pub struct KeyValue {
287
290
pub enum ErrorCode {
288
291
/// Default protobuf Enum value. Will not be used as `ErrorCode` by server.
289
292
Unknown = 0 ,
290
- /// CONFLICT_EXCEPTION is used when the request contains mismatched version (either key or global)
293
+ /// Used when the request contains mismatched version (either key or global)
291
294
/// in `PutObjectRequest`. For more info refer `PutObjectRequest`.
292
295
ConflictException = 1 ,
293
- /// INVALID_REQUEST_EXCEPTION is used in the following cases:
296
+ /// Used in the following cases:
294
297
/// - The request was missing a required argument.
295
298
/// - The specified argument was invalid, incomplete or in the wrong format.
296
299
/// - The request body of api cannot be deserialized into corresponding protobuf object.
297
300
InvalidRequestException = 2 ,
298
- /// An internal server error occurred, client is probably at no fault and can safely retry this
299
- /// error with exponential backoff.
301
+ /// Used when an internal server error occurred, client is probably at no fault and can safely retry
302
+ /// this error with exponential backoff.
300
303
InternalServerException = 3 ,
304
+ /// Used when the specified `key` in a `GetObjectRequest` does not exist.
305
+ NoSuchKeyException = 4 ,
301
306
}
302
307
impl ErrorCode {
303
308
/// String value of the enum field names used in the ProtoBuf definition.
@@ -310,6 +315,7 @@ impl ErrorCode {
310
315
ErrorCode :: ConflictException => "CONFLICT_EXCEPTION" ,
311
316
ErrorCode :: InvalidRequestException => "INVALID_REQUEST_EXCEPTION" ,
312
317
ErrorCode :: InternalServerException => "INTERNAL_SERVER_EXCEPTION" ,
318
+ ErrorCode :: NoSuchKeyException => "NO_SUCH_KEY_EXCEPTION" ,
313
319
}
314
320
}
315
321
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -319,6 +325,7 @@ impl ErrorCode {
319
325
"CONFLICT_EXCEPTION" => Some ( Self :: ConflictException ) ,
320
326
"INVALID_REQUEST_EXCEPTION" => Some ( Self :: InvalidRequestException ) ,
321
327
"INTERNAL_SERVER_EXCEPTION" => Some ( Self :: InternalServerException ) ,
328
+ "NO_SUCH_KEY_EXCEPTION" => Some ( Self :: NoSuchKeyException ) ,
322
329
_ => None ,
323
330
}
324
331
}
0 commit comments