{"record":{"id":"2c0276340785d49d","repo":"juspay/hyperswitch","slug":"couldn-t-get-getpaymentintentmetricrequest","errorCode":null,"errorMessage":"Couldn't get GetPaymentIntentMetricRequest","messagePattern":"Couldn't get GetPaymentIntentMetricRequest","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/router/src/analytics.rs","lineNumber":736,"sourceCode":"        ))\n        .await\n    }\n\n    /// # Panics\n    ///\n    /// Panics if `json_payload` array does not contain one `GetPaymentIntentMetricRequest` element.\n    pub async fn get_merchant_payment_intent_metrics(\n        state: web::Data<AppState>,\n        req: actix_web::HttpRequest,\n        json_payload: web::Json<[GetPaymentIntentMetricRequest; 1]>,\n    ) -> impl Responder {\n        // safety: This shouldn't panic owing to the data type\n        #[allow(clippy::expect_used)]\n        let payload = json_payload\n            .into_inner()\n            .to_vec()\n            .pop()\n            .expect(\"Couldn't get GetPaymentIntentMetricRequest\");\n        let flow = AnalyticsFlow::GetPaymentIntentMetrics;\n        Box::pin(api::server_wrap(\n            flow,\n            state,\n            &req,\n            payload,\n            |state, auth: AuthenticationData, req, _| async move {\n                let auth_info = auth.platform.to_merchant_level_auth_info();\n\n                let validator_response = request_validator(\n                    AnalyticsRequest {\n                        payment_intent: Some(req.clone()),\n                        ..Default::default()\n                    },\n                    &state,\n                )\n                .await?;\n                let ex_rates = validator_response;","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/juspay/hyperswitch/blob/705a3219504c3cf9034e71d956455f8834ea4e64/crates/router/src/analytics.rs#L718-L754","documentation":"Error \"Couldn't get GetPaymentIntentMetricRequest\" thrown in juspay/hyperswitch.","triggerScenarios":"Thrown at crates/router/src/analytics.rs:736 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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)"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"705a3219504c3cf9034e71d956455f8834ea4e64","analyzedAt":"2026-08-19T10:36:43.745Z","contentChangedAt":"2026-08-19T10:36:43.745Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}