Skip to content

Commit

Permalink
remove not prod error
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Aug 11, 2024
1 parent 4ab7ee6 commit fdaf164
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions scylla-server-rust/src/controllers/car_command_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ pub async fn send_config_command(
);
// disable scylla if not prod, as there will be None mqtt client
let Some(client) = client else {
return Err(ScyllaError::NotProd(
"Car config sending is disabled in mock mode!".to_string(),
));
warn!("Cannot use config endpoint in dev mode!");
return Ok(())
};

// the protobuf calypso converts into CAN
Expand Down
3 changes: 0 additions & 3 deletions scylla-server-rust/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use tracing::warn;
pub enum ScyllaError {
/// Any prisma query which errors out
PrismaError(QueryError),
/// Not available in mock mode, which the system is in
NotProd(String),
/// An instruction was not encodable
InvalidEncoding(String),
/// Could not communicate to car
Expand Down Expand Up @@ -43,7 +41,6 @@ impl IntoResponse for ScyllaError {
StatusCode::BAD_REQUEST,
format!("Misc query error: {}", error),
),
ScyllaError::NotProd(reason) => (StatusCode::SERVICE_UNAVAILABLE, reason),
ScyllaError::InvalidEncoding(reason) => (StatusCode::UNPROCESSABLE_ENTITY, reason),
ScyllaError::CommFailure(reason) => (StatusCode::BAD_GATEWAY, reason),
ScyllaError::EmptyResult => (
Expand Down

0 comments on commit fdaf164

Please sign in to comment.