{"record":{"id":"8e56eb69a2775917","repo":"juspay/hyperswitch","slug":"atleast-one-operation-must-be-specitied","errorCode":null,"errorMessage":"atleast one operation must be specitied","messagePattern":"atleast one operation must be specitied","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/router_derive/src/macros/operation.rs","lineNumber":311,"sourceCode":"fn get_operation_properties(\n    operation_enums: Vec<OperationsEnumMeta>,\n) -> syn::Result<OperationProperties> {\n    let mut operations = vec![];\n    let mut flows = vec![];\n\n    for operation in operation_enums {\n        match operation {\n            OperationsEnumMeta::Operations { value, .. } => {\n                operations = value;\n            }\n            OperationsEnumMeta::Flow { value, .. } => {\n                flows = value;\n            }\n        }\n    }\n\n    if operations.is_empty() {\n        Err(syn::Error::new(\n            Span::call_site(),\n            \"atleast one operation must be specitied\",\n        ))?;\n    }\n\n    if flows.is_empty() {\n        Err(syn::Error::new(\n            Span::call_site(),\n            \"atleast one flow must be specitied\",\n        ))?;\n    }\n\n    Ok(OperationProperties { operations, flows })\n}\n\nimpl Parse for Derives {\n    fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {\n        let text = input.parse::<syn::LitStr>()?;","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/juspay/hyperswitch/blob/705a3219504c3cf9034e71d956455f8834ea4e64/crates/router_derive/src/macros/operation.rs#L293-L329","documentation":"Error \"atleast one operation must be specitied\" thrown in juspay/hyperswitch.","triggerScenarios":"Thrown at crates/router_derive/src/macros/operation.rs:311 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Specify at least one operation in the macro invocation (e.g. operations = [Create, Update])"],"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"}