juspay/hyperswitch · error · syn::Error
atleast one operation must be specitied
Error message
atleast one operation must be specitied
What it means
Error "atleast one operation must be specitied" thrown in juspay/hyperswitch.
Source
Thrown at crates/router_derive/src/macros/operation.rs:311
fn get_operation_properties(
operation_enums: Vec<OperationsEnumMeta>,
) -> syn::Result<OperationProperties> {
let mut operations = vec![];
let mut flows = vec![];
for operation in operation_enums {
match operation {
OperationsEnumMeta::Operations { value, .. } => {
operations = value;
}
OperationsEnumMeta::Flow { value, .. } => {
flows = value;
}
}
}
if operations.is_empty() {
Err(syn::Error::new(
Span::call_site(),
"atleast one operation must be specitied",
))?;
}
if flows.is_empty() {
Err(syn::Error::new(
Span::call_site(),
"atleast one flow must be specitied",
))?;
}
Ok(OperationProperties { operations, flows })
}
impl Parse for Derives {
fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
let text = input.parse::<syn::LitStr>()?;View on GitHub (pinned to 705a321950)
Solutions
- Specify at least one operation in the macro invocation (e.g. operations = [Create, Update])
When it happens
Trigger: Thrown at crates/router_derive/src/macros/operation.rs:311 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/8e56eb69a2775917.
Report an issue: GitHub.