juspay/hyperswitch · error
Couldn't get GetActivePaymentsMetricRequest
Error message
Couldn't get GetActivePaymentsMetricRequest
What it means
Error "Couldn't get GetActivePaymentsMetricRequest" thrown in juspay/hyperswitch.
Source
Thrown at crates/router/src/analytics.rs:1205
.await
}
#[cfg(feature = "v1")]
/// # Panics
///
/// Panics if `json_payload` array does not contain one `GetActivePaymentsMetricRequest` element.
pub async fn get_active_payments_metrics(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<[GetActivePaymentsMetricRequest; 1]>,
) -> impl Responder {
// safety: This shouldn't panic owing to the data type
#[allow(clippy::expect_used)]
let payload = json_payload
.into_inner()
.to_vec()
.pop()
.expect("Couldn't get GetActivePaymentsMetricRequest");
let flow = AnalyticsFlow::GetActivePaymentsMetrics;
Box::pin(api::server_wrap(
flow,
state,
&req,
payload,
|state, auth: AuthenticationData, req, _| async move {
analytics::active_payments::get_metrics(
&state.pool,
&auth.platform.get_processor().get_account().publishable_key,
auth.platform.get_processor().get_account().get_id(),
req,
)
.await
.map(ApplicationResponse::Json)
},
&auth::JWTAuth {
permission: Permission::MerchantAnalyticsRead,View on GitHub (pinned to 705a321950)
Solutions
- Check that the analytics metrics feature is enabled and the request type is supported by the analytics provider
- Verify the metrics request construction parameters (merchant id, time range, filters)
When it happens
Trigger: Thrown at crates/router/src/analytics.rs:1205 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of juspay/hyperswitch@705a321950 (2026-08-19).
Data as JSON: /api/errors/425c0e7b9add8b27.
Report an issue: GitHub.