Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion crates/common/src/integrations/adserver_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,14 @@ impl AuctionProvider for AdServerMockProvider {
}

fn backend_name(&self) -> Option<String> {
BackendConfig::from_url(&self.config.endpoint, true).ok()
BackendConfig::from_url(&self.config.endpoint, true)
.inspect_err(|e| {
log::error!(
"Failed to create backend for AdServer Mock endpoint '{}': {e:?}",
self.config.endpoint
);
})
.ok()
}
}

Expand Down
9 changes: 8 additions & 1 deletion crates/common/src/integrations/aps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,14 @@ impl AuctionProvider for ApsAuctionProvider {
}

fn backend_name(&self) -> Option<String> {
BackendConfig::from_url(&self.config.endpoint, true).ok()
BackendConfig::from_url(&self.config.endpoint, true)
.inspect_err(|e| {
log::error!(
"Failed to create backend for APS endpoint '{}': {e:?}",
self.config.endpoint
);
})
.ok()
}
}

Expand Down
13 changes: 9 additions & 4 deletions crates/common/src/integrations/nextjs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@ pub fn register(settings: &Settings) -> Option<IntegrationRegistration> {
}

fn build(settings: &Settings) -> Option<Arc<NextJsIntegrationConfig>> {
let config = settings
.integration_config::<NextJsIntegrationConfig>(NEXTJS_INTEGRATION_ID)
.ok()
.flatten()?;
let config = match settings.integration_config::<NextJsIntegrationConfig>(NEXTJS_INTEGRATION_ID)
{
Ok(Some(config)) => config,
Ok(None) => return None,
Err(err) => {
log::error!("Failed to load NextJS integration config: {err:?}");
return None;
}
};
Some(Arc::new(config))
}

Expand Down
22 changes: 17 additions & 5 deletions crates/common/src/integrations/prebid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,15 @@ impl PrebidIntegration {
}

fn build(settings: &Settings) -> Option<Arc<PrebidIntegration>> {
let config = settings
.integration_config::<PrebidIntegrationConfig>(PREBID_INTEGRATION_ID)
.ok()
.flatten()?;
let config = match settings.integration_config::<PrebidIntegrationConfig>(PREBID_INTEGRATION_ID)
{
Ok(Some(config)) => config,
Ok(None) => return None,
Err(err) => {
log::error!("Failed to load Prebid integration config: {err:?}");
return None;
}
};
if !config.enabled {
return None;
}
Expand Down Expand Up @@ -976,7 +981,14 @@ impl AuctionProvider for PrebidAuctionProvider {
}

fn backend_name(&self) -> Option<String> {
BackendConfig::from_url(&self.config.server_url, true).ok()
BackendConfig::from_url(&self.config.server_url, true)
.inspect_err(|e| {
log::error!(
"Failed to create backend for Prebid server URL '{}': {e:?}",
self.config.server_url
);
})
.ok()
}
}

Expand Down
Loading