#[non_exhaustive]pub struct DeleteFunctionUrlConfigError {
pub kind: DeleteFunctionUrlConfigErrorKind,
/* private fields */
}
Expand description
Error type for the DeleteFunctionUrlConfig
operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: DeleteFunctionUrlConfigErrorKind
Kind of error that occurred.
Implementations§
source§impl DeleteFunctionUrlConfigError
impl DeleteFunctionUrlConfigError
sourcepub fn new(kind: DeleteFunctionUrlConfigErrorKind, meta: Error) -> Self
pub fn new(kind: DeleteFunctionUrlConfigErrorKind, meta: Error) -> Self
Creates a new DeleteFunctionUrlConfigError
.
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 DeleteFunctionUrlConfigError::Unhandled
variant from any error type.
Examples found in repository?
1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955
pub fn parse_delete_function_url_config_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DeleteFunctionUrlConfigOutput,
crate::error::DeleteFunctionUrlConfigError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DeleteFunctionUrlConfigError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"ResourceConflictException" => crate::error::DeleteFunctionUrlConfigError {
meta: generic,
kind: crate::error::DeleteFunctionUrlConfigErrorKind::ResourceConflictException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_conflict_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceNotFoundException" => crate::error::DeleteFunctionUrlConfigError {
meta: generic,
kind: crate::error::DeleteFunctionUrlConfigErrorKind::ResourceNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ServiceException" => {
crate::error::DeleteFunctionUrlConfigError {
meta: generic,
kind: crate::error::DeleteFunctionUrlConfigErrorKind::ServiceException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::service_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_service_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"TooManyRequestsException" => crate::error::DeleteFunctionUrlConfigError {
meta: generic,
kind: crate::error::DeleteFunctionUrlConfigErrorKind::TooManyRequestsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::too_many_requests_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
output = output.set_retry_after_seconds(
crate::http_serde::deser_header_delete_function_url_config_too_many_requests_exception_retry_after_seconds(response.headers())
.map_err(|_|crate::error::DeleteFunctionUrlConfigError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After"))?
);
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::DeleteFunctionUrlConfigError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the DeleteFunctionUrlConfigError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955
pub fn parse_delete_function_url_config_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DeleteFunctionUrlConfigOutput,
crate::error::DeleteFunctionUrlConfigError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DeleteFunctionUrlConfigError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"ResourceConflictException" => crate::error::DeleteFunctionUrlConfigError {
meta: generic,
kind: crate::error::DeleteFunctionUrlConfigErrorKind::ResourceConflictException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_conflict_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceNotFoundException" => crate::error::DeleteFunctionUrlConfigError {
meta: generic,
kind: crate::error::DeleteFunctionUrlConfigErrorKind::ResourceNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ServiceException" => {
crate::error::DeleteFunctionUrlConfigError {
meta: generic,
kind: crate::error::DeleteFunctionUrlConfigErrorKind::ServiceException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::service_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_service_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"TooManyRequestsException" => crate::error::DeleteFunctionUrlConfigError {
meta: generic,
kind: crate::error::DeleteFunctionUrlConfigErrorKind::TooManyRequestsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::too_many_requests_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteFunctionUrlConfigError::unhandled)?;
output = output.set_retry_after_seconds(
crate::http_serde::deser_header_delete_function_url_config_too_many_requests_exception_retry_after_seconds(response.headers())
.map_err(|_|crate::error::DeleteFunctionUrlConfigError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After"))?
);
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::DeleteFunctionUrlConfigError::generic(generic),
})
}
sourcepub fn meta(&self) -> &Error
pub fn meta(&self) -> &Error
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request ID if it’s available.
sourcepub fn is_resource_conflict_exception(&self) -> bool
pub fn is_resource_conflict_exception(&self) -> bool
Returns true
if the error kind is DeleteFunctionUrlConfigErrorKind::ResourceConflictException
.
sourcepub fn is_resource_not_found_exception(&self) -> bool
pub fn is_resource_not_found_exception(&self) -> bool
Returns true
if the error kind is DeleteFunctionUrlConfigErrorKind::ResourceNotFoundException
.
sourcepub fn is_service_exception(&self) -> bool
pub fn is_service_exception(&self) -> bool
Returns true
if the error kind is DeleteFunctionUrlConfigErrorKind::ServiceException
.
sourcepub fn is_too_many_requests_exception(&self) -> bool
pub fn is_too_many_requests_exception(&self) -> bool
Returns true
if the error kind is DeleteFunctionUrlConfigErrorKind::TooManyRequestsException
.