mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-10 11:19:50 +08:00
fix(conversion): improve stream failures and diagnostic exports
This commit is contained in:
@@ -34,6 +34,7 @@ pub struct CandidateFailureDiagnostic {
|
||||
client_api_format: Option<String>,
|
||||
provider_api_format: Option<String>,
|
||||
safe_to_show: bool,
|
||||
details: Option<Value>,
|
||||
}
|
||||
|
||||
impl CandidateFailureDiagnostic {
|
||||
@@ -50,6 +51,7 @@ impl CandidateFailureDiagnostic {
|
||||
client_api_format: None,
|
||||
provider_api_format: None,
|
||||
safe_to_show: true,
|
||||
details: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +60,11 @@ impl CandidateFailureDiagnostic {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn details(mut self, details: Value) -> Self {
|
||||
self.details = Some(details);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn formats(
|
||||
mut self,
|
||||
client_api_format: impl Into<String>,
|
||||
@@ -219,6 +226,10 @@ impl CandidateFailureDiagnostic {
|
||||
"client_api_format": self.client_api_format,
|
||||
"provider_api_format": self.provider_api_format,
|
||||
"safe_to_show": self.safe_to_show,
|
||||
"details": self.details,
|
||||
"stage": "request",
|
||||
"source_format": self.client_api_format,
|
||||
"target_format": self.provider_api_format,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user