Skip to content

Commit

Permalink
fix: adding error to sanitized connection (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagojez authored Dec 9, 2024
1 parent f0d56c7 commit 7e25918
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integrationos-api/src/logic/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ impl PublicExt<Connection> for CreateConnectionPayload {
settings: input.settings,
throughput: input.throughput,
ownership: input.ownership,
error: input.error,
has_error: input.has_error,
oauth: input.oauth,
record_metadata: input.record_metadata,
}
Expand Down Expand Up @@ -365,6 +367,8 @@ pub async fn create_connection(
settings: connection.settings,
throughput: connection.throughput,
ownership: connection.ownership,
has_error: connection.has_error,
error: connection.error,
oauth: connection.oauth,
record_metadata: connection.record_metadata,
}))
Expand Down
4 changes: 4 additions & 0 deletions integrationos-domain/src/domain/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ pub struct SanitizedConnection {
pub ownership: Ownership,
#[serde(default)]
pub oauth: Option<OAuth>,
#[serde(default)]
pub has_error: bool,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub error: Option<String>,
#[serde(flatten, default)]
pub record_metadata: RecordMetadata,
}
Expand Down

0 comments on commit 7e25918

Please sign in to comment.