Handle non-authentication actions

This commit is contained in:
puck 2025-12-08 11:55:00 +00:00
parent 8f188a05cf
commit 8b812da751
3 changed files with 21 additions and 8 deletions

View file

@ -105,7 +105,11 @@ async fn run_auth(
service: String::from("UI Test"),
}
} else {
let ctx = digid_api::wid_init(&session_id).await;
let Some(ctx) = digid_api::wid_init(&session_id).await else {
ctg_pipe.send(pipe::CardToGUI::ProcessingMessage { message: "Failed to initialize DigiD session.".to_owned() }).await;
return Ok(());
};
ctx.start().await;
ctx
};