#[non_exhaustive]pub enum UpdateCommentError {
CommentContentRequiredException(CommentContentRequiredException),
CommentContentSizeLimitExceededException(CommentContentSizeLimitExceededException),
CommentDeletedException(CommentDeletedException),
CommentDoesNotExistException(CommentDoesNotExistException),
CommentIdRequiredException(CommentIdRequiredException),
CommentNotCreatedByCallerException(CommentNotCreatedByCallerException),
InvalidCommentIdException(InvalidCommentIdException),
Unhandled(Unhandled),
}
Expand description
Error type for the UpdateCommentError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CommentContentRequiredException(CommentContentRequiredException)
The comment is empty. You must provide some content for a comment. The content cannot be null.
CommentContentSizeLimitExceededException(CommentContentSizeLimitExceededException)
The comment is too large. Comments are limited to 10,240 characters.
CommentDeletedException(CommentDeletedException)
This comment has already been deleted. You cannot edit or delete a deleted comment.
CommentDoesNotExistException(CommentDoesNotExistException)
No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.
CommentIdRequiredException(CommentIdRequiredException)
The comment ID is missing or null. A comment ID is required.
CommentNotCreatedByCallerException(CommentNotCreatedByCallerException)
You cannot modify or delete this comment. Only comment authors can modify or delete their comments.
InvalidCommentIdException(InvalidCommentIdException)
The comment ID is not in a valid format. Make sure that you have provided the full comment ID.
Unhandled(Unhandled)
Unhandled
directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code()
:
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata
for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Implementations§
source§impl UpdateCommentError
impl UpdateCommentError
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the UpdateCommentError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the UpdateCommentError::Unhandled
variant from an ErrorMetadata
.
sourcepub fn meta(&self) -> &ErrorMetadata
pub fn meta(&self) -> &ErrorMetadata
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn is_comment_content_required_exception(&self) -> bool
pub fn is_comment_content_required_exception(&self) -> bool
Returns true
if the error kind is UpdateCommentError::CommentContentRequiredException
.
sourcepub fn is_comment_content_size_limit_exceeded_exception(&self) -> bool
pub fn is_comment_content_size_limit_exceeded_exception(&self) -> bool
Returns true
if the error kind is UpdateCommentError::CommentContentSizeLimitExceededException
.
sourcepub fn is_comment_deleted_exception(&self) -> bool
pub fn is_comment_deleted_exception(&self) -> bool
Returns true
if the error kind is UpdateCommentError::CommentDeletedException
.
sourcepub fn is_comment_does_not_exist_exception(&self) -> bool
pub fn is_comment_does_not_exist_exception(&self) -> bool
Returns true
if the error kind is UpdateCommentError::CommentDoesNotExistException
.
sourcepub fn is_comment_id_required_exception(&self) -> bool
pub fn is_comment_id_required_exception(&self) -> bool
Returns true
if the error kind is UpdateCommentError::CommentIdRequiredException
.
sourcepub fn is_comment_not_created_by_caller_exception(&self) -> bool
pub fn is_comment_not_created_by_caller_exception(&self) -> bool
Returns true
if the error kind is UpdateCommentError::CommentNotCreatedByCallerException
.
sourcepub fn is_invalid_comment_id_exception(&self) -> bool
pub fn is_invalid_comment_id_exception(&self) -> bool
Returns true
if the error kind is UpdateCommentError::InvalidCommentIdException
.
Trait Implementations§
source§impl CreateUnhandledError for UpdateCommentError
impl CreateUnhandledError for UpdateCommentError
source§fn create_unhandled_error(
source: Box<dyn Error + Send + Sync + 'static>,
meta: Option<ErrorMetadata>
) -> Self
fn create_unhandled_error( source: Box<dyn Error + Send + Sync + 'static>, meta: Option<ErrorMetadata> ) -> Self
source
and error metadata.source§impl Debug for UpdateCommentError
impl Debug for UpdateCommentError
source§impl Display for UpdateCommentError
impl Display for UpdateCommentError
source§impl Error for UpdateCommentError
impl Error for UpdateCommentError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<UpdateCommentError> for Error
impl From<UpdateCommentError> for Error
source§fn from(err: UpdateCommentError) -> Self
fn from(err: UpdateCommentError) -> Self
source§impl ProvideErrorMetadata for UpdateCommentError
impl ProvideErrorMetadata for UpdateCommentError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for UpdateCommentError
impl RequestId for UpdateCommentError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.