juspay/hyperswitch · error · syn::Error

atleast one flow must be specitied

Error message

atleast one flow must be specitied

What it means

Error "atleast one flow must be specitied" thrown in juspay/hyperswitch.

Source

Thrown at crates/router_derive/src/macros/operation.rs:318

        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>()?;
        let value = text.value();

        value.as_str().parse().map_err(|_| {
            syn::Error::new_spanned(
                &text,
                format!(
                    "Unexpected value for flow: `{value}`. Possible values are `{}`",

View on GitHub (pinned to 705a321950)

Solutions

  1. Specify at least one flow in the macro invocation (e.g. flows = [Authorize, Capture])

When it happens

Trigger: Thrown at crates/router_derive/src/macros/operation.rs:318 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/6c840d1f8828b79a. Report an issue: GitHub.