{"record":{"id":"71985b3abe0e92be","repo":"juspay/hyperswitch","slug":"couldn-t-get-getfrmmetricrequest","errorCode":null,"errorMessage":"Couldn't get GetFrmMetricRequest","messagePattern":"Couldn't get GetFrmMetricRequest","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/router/src/analytics.rs","lineNumber":1123,"sourceCode":"        ))\n        .await\n    }\n\n    /// # Panics\n    ///\n    /// Panics if `json_payload` array does not contain one `GetFrmMetricRequest` element.\n    pub async fn get_frm_metrics(\n        state: web::Data<AppState>,\n        req: actix_web::HttpRequest,\n        json_payload: web::Json<[GetFrmMetricRequest; 1]>,\n    ) -> impl Responder {\n        #[allow(clippy::expect_used)]\n        // safety: This shouldn't panic owing to the data type\n        let payload = json_payload\n            .into_inner()\n            .to_vec()\n            .pop()\n            .expect(\"Couldn't get GetFrmMetricRequest\");\n        let flow = AnalyticsFlow::GetFrmMetrics;\n        Box::pin(api::server_wrap(\n            flow,\n            state,\n            &req,\n            payload,\n            |state, auth: AuthenticationData, req, _| async move {\n                analytics::frm::get_metrics(\n                    &state.pool,\n                    auth.platform.get_processor().get_account().get_id(),\n                    req,\n                )\n                .await\n                .map(ApplicationResponse::Json)\n            },\n            &auth::JWTAuth {\n                permission: Permission::MerchantAnalyticsRead,\n                allow_connected: false,","sourceCodeStart":1105,"sourceCodeEnd":1141,"githubUrl":"https://github.com/juspay/hyperswitch/blob/705a3219504c3cf9034e71d956455f8834ea4e64/crates/router/src/analytics.rs#L1105-L1141","documentation":"Error \"Couldn't get GetFrmMetricRequest\" thrown in juspay/hyperswitch.","triggerScenarios":"Thrown at crates/router/src/analytics.rs:1123 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-14T00:17:10.932Z"}