pub trait SdkResultExt<T> {
// Required method
fn into_sdk_error(
self,
) -> impl Future<Output = Result<T, AlienError<GenericError>>> + Send;
}Expand description
Extension trait for converting manager SDK results to AlienError.
Async because it reads the body of an error response. The manager answers
every failure with an Alien error JSON body, and the spec this client is
generated from declares no error responses (see
client-sdks/manager/scripts/fix-openapi.mjs), so every error status
arrives as Error::UnexpectedResponse with its body unread. Reading it keeps
the server’s code, message, hint and source instead of “Unexpected response”.
Required Methods§
Sourcefn into_sdk_error(
self,
) -> impl Future<Output = Result<T, AlienError<GenericError>>> + Send
fn into_sdk_error( self, ) -> impl Future<Output = Result<T, AlienError<GenericError>>> + Send
Convert SDK result to AlienError result, preserving API error details.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".