From 37f26dc430e5922c0be1292b5a38b62af58c28af Mon Sep 17 00:00:00 2001 From: Ginger Date: Thu, 28 May 2026 10:23:31 -0400 Subject: [PATCH] fix: Panic when trying to check an unknown UIAA stage type --- src/service/uiaa/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/service/uiaa/mod.rs b/src/service/uiaa/mod.rs index 26bda24b5..2bb70c152 100644 --- a/src/service/uiaa/mod.rs +++ b/src/service/uiaa/mod.rs @@ -584,10 +584,12 @@ impl Service { } }, | AuthData::Terms(_) => Ok(AuthType::Terms), - | _ => Err(StandardErrorBody::new( - ErrorKind::Unrecognized, - "Unsupported stage type".into(), - )), + | unknown => { + // We already checked that the stage type is one that exists in the flow, + // so we can only get here if we ourselves served a flow with a stage that we + // don't understand. + panic!("tried to check an unsupported stage type: {unknown:?}"); + }, }, }?;