@@ -10,7 +10,10 @@ pub struct GetObjectRequest {
1010 /// Authorization and billing can also be performed at the `store_id` level.
1111 #[ prost( string, tag = "1" ) ]
1212 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`.
1417 ///
1518 /// Consistency Guarantee:
1619 /// Get(read) operations against a `key` are consistent reads and will reflect all previous writes,
@@ -287,17 +290,19 @@ pub struct KeyValue {
287290pub enum ErrorCode {
288291 /// Default protobuf Enum value. Will not be used as `ErrorCode` by server.
289292 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)
291294 /// in `PutObjectRequest`. For more info refer `PutObjectRequest`.
292295 ConflictException = 1 ,
293- /// INVALID_REQUEST_EXCEPTION is used in the following cases:
296+ /// Used in the following cases:
294297 /// - The request was missing a required argument.
295298 /// - The specified argument was invalid, incomplete or in the wrong format.
296299 /// - The request body of api cannot be deserialized into corresponding protobuf object.
297300 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.
300303 InternalServerException = 3 ,
304+ /// Used when the specified `key` in a `GetObjectRequest` does not exist.
305+ NoSuchKeyException = 4 ,
301306}
302307impl ErrorCode {
303308 /// String value of the enum field names used in the ProtoBuf definition.
@@ -310,6 +315,7 @@ impl ErrorCode {
310315 ErrorCode :: ConflictException => "CONFLICT_EXCEPTION" ,
311316 ErrorCode :: InvalidRequestException => "INVALID_REQUEST_EXCEPTION" ,
312317 ErrorCode :: InternalServerException => "INTERNAL_SERVER_EXCEPTION" ,
318+ ErrorCode :: NoSuchKeyException => "NO_SUCH_KEY_EXCEPTION" ,
313319 }
314320 }
315321 /// Creates an enum from field names used in the ProtoBuf definition.
@@ -319,6 +325,7 @@ impl ErrorCode {
319325 "CONFLICT_EXCEPTION" => Some ( Self :: ConflictException ) ,
320326 "INVALID_REQUEST_EXCEPTION" => Some ( Self :: InvalidRequestException ) ,
321327 "INTERNAL_SERVER_EXCEPTION" => Some ( Self :: InternalServerException ) ,
328+ "NO_SUCH_KEY_EXCEPTION" => Some ( Self :: NoSuchKeyException ) ,
322329 _ => None ,
323330 }
324331 }
0 commit comments