MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / reason_code

Method reason_code

crates/chat-cli/src/api_client/error.rs:104–123  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

102
103impl ReasonCode for ApiClientError {
104 fn reason_code(&self) -> String {
105 match self {
106 Self::ConverseStream(e) => e.reason_code(),
107 Self::GenerateCompletions(e) => sdk_error_code(e),
108 Self::GenerateRecommendations(e) => sdk_error_code(e),
109 Self::ListAvailableCustomizations(e) => sdk_error_code(e),
110 Self::ListAvailableServices(e) => sdk_error_code(e),
111 Self::CodewhispererChatResponseStream(e) => sdk_error_code(e),
112 Self::QDeveloperChatResponseStream(e) => sdk_error_code(e),
113 Self::ListAvailableProfilesError(e) => sdk_error_code(e),
114 Self::SendTelemetryEvent(e) => sdk_error_code(e),
115 Self::CreateSubscriptionToken(e) => sdk_error_code(e),
116 Self::SmithyBuild(_) => "SmithyBuildError".to_string(),
117 Self::AuthError(_) => "AuthError".to_string(),
118 Self::Credentials(_) => "CredentialsError".to_string(),
119 Self::ListAvailableModelsError(e) => sdk_error_code(e),
120 Self::DefaultModelNotFound => "DefaultModelNotFound".to_string(),
121 Self::GetProfileError(e) => sdk_error_code(e),
122 }
123 }
124}
125
126#[derive(Debug, Error)]

Callers

nothing calls this directly

Calls 3

sdk_error_codeFunction · 0.85
to_stringMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected