We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ac510f commit 631f23aCopy full SHA for 631f23a
examples/vault-variable-test/src/lib.rs
@@ -8,7 +8,7 @@ use spin_sdk::{
8
#[http_component]
9
fn handle_vault_variable_test(req: Request) -> Result<impl IntoResponse> {
10
let attempt = std::str::from_utf8(req.body()).unwrap();
11
- let expected = variables::get("password").expect("could not get variable");
+ let expected = variables::get("password").context("could not get variable")?;
12
let response = if expected == attempt {
13
"accepted"
14
} else {
0 commit comments