{"record":{"id":"7e8cd8919967fbbc","repo":"juspay/hyperswitch","slug":"unexpected-keyword-possible-values-are","errorCode":null,"errorMessage":"Unexpected {keyword}, possible values are {}","messagePattern":"Unexpected (.+?), possible values are (.+?)","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/router_derive/src/macros/operation.rs","lineNumber":371,"sourceCode":"                    \"Unexpected value for operation: `{value}`. Possible values are `{}`\",\n                    helpers::get_possible_values_for_enum::<Self>()\n                ),\n            )\n        })\n    }\n}\n\nfn parse_list_string<T>(list_string: String, keyword: &str) -> syn::Result<Vec<T>>\nwhere\n    T: FromStr + IntoEnumIterator + ToString,\n{\n    list_string\n        .split(',')\n        .map(str::trim)\n        .map(T::from_str)\n        .map(|result| {\n            result.map_err(|_| {\n                syn::Error::new(\n                    Span::call_site(),\n                    format!(\n                        \"Unexpected {keyword}, possible values are {}\",\n                        helpers::get_possible_values_for_enum::<T>()\n                    ),\n                )\n            })\n        })\n        .collect()\n}\n\nfn get_conversions(input: syn::parse::ParseStream<'_>) -> syn::Result<Vec<Conversion>> {\n    let lit_str_list = input.parse::<syn::LitStr>()?;\n    parse_list_string(lit_str_list.value(), \"operation\")\n}\n\nfn get_derives(input: syn::parse::ParseStream<'_>) -> syn::Result<Vec<Derives>> {\n    let lit_str_list = input.parse::<syn::LitStr>()?;","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/juspay/hyperswitch/blob/705a3219504c3cf9034e71d956455f8834ea4e64/crates/router_derive/src/macros/operation.rs#L353-L389","documentation":"Error \"Unexpected {keyword}, possible values are {}\" thrown in juspay/hyperswitch.","triggerScenarios":"Thrown at crates/router_derive/src/macros/operation.rs:371 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace the unexpected keyword with one of the listed possible values in the macro invocation"],"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"}