Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore(referral): hide internal error in response message (#2022)

Will Hutchinson621b16d2283c
diff --git a/rust/cloud-storage/referral/src/inbound/axum_router.rs b/rust/cloud-storage/referral/src/inbound/axum_router.rs
index 6828cf563b..06d1ee9a4a 100644
--- a/rust/cloud-storage/referral/src/inbound/axum_router.rs
+++ b/rust/cloud-storage/referral/src/inbound/axum_router.rs
@@ -28,11 +28,13 @@ impl IntoResponse for ReferralError {
ReferralError::Internal(_) => StatusCode::INTERNAL_SERVER_ERROR,
};
+ let mut message = self.to_string();
if status_code.is_server_error() {
tracing::error!(error=?self, "internal server error");
+ // override internal server error to hide errors
+ message = "internal server error".to_string();
}
- let message = self.to_string();
(status_code, Json(ErrorResponse { message: &message })).into_response()
}
}