Skip to content
Closed
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
4 changes: 3 additions & 1 deletion packages/edge/infra/guard/server/src/routing/api.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use chirp_workflow::prelude::*;
use cluster::types::{Filter, PoolType};
use global_error::GlobalResult;
use rivet_guard_core::proxy_service::{RouteConfig, RouteTarget, RoutingOutput, RoutingTimeout, StructuredResponse};
use rivet_guard_core::proxy_service::{
RouteConfig, RouteTarget, RoutingOutput, RoutingTimeout, StructuredResponse,
};
use rivet_guard_core::status::StatusCode;
use std::borrow::Cow;
use uuid::Uuid;
Expand Down
21 changes: 18 additions & 3 deletions packages/edge/infra/guard/server/src/routing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ pub fn create_routing_function(
}
Err(err) => {
tracing::error!("Error in route_via_route_config: {err}");
// Continue to next routing method

return Ok(RoutingOutput::Response(StructuredResponse {
status: StatusCode::INTERNAL_SERVER_ERROR,
message: Cow::Borrowed("Failed while attempting to route request."),
docs: None,
}));
}
}

Expand All @@ -75,7 +80,12 @@ pub fn create_routing_function(
}
Err(err) => {
tracing::error!("Error in actor_routes::route_actor_request: {err}");
// Continue to next routing method

return Ok(RoutingOutput::Response(StructuredResponse {
status: StatusCode::INTERNAL_SERVER_ERROR,
message: Cow::Borrowed("Failed while attempting to route request."),
docs: None,
}));
}
}

Expand All @@ -94,7 +104,12 @@ pub fn create_routing_function(
}
Err(err) => {
tracing::error!("Error in api::route_api_request: {err}");
// Continue to next routing method

return Ok(RoutingOutput::Response(StructuredResponse {
status: StatusCode::INTERNAL_SERVER_ERROR,
message: Cow::Borrowed("Failed while attempting to route request."),
docs: None,
}));
}
}

Expand Down
Loading