Skip to content

Commit 631f23a

Browse files
tpmccallumrylev
andauthored
Update examples/vault-variable-test/src/lib.rs
Signed-off-by: tpmccallum [email protected] Co-authored-by: Ryan Levick <[email protected]> Signed-off-by: Timothy McCallum <[email protected]>
1 parent 8ac510f commit 631f23a

File tree

1 file changed

+1
-1
lines changed
  • examples/vault-variable-test/src

1 file changed

+1
-1
lines changed

examples/vault-variable-test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use spin_sdk::{
88
#[http_component]
99
fn handle_vault_variable_test(req: Request) -> Result<impl IntoResponse> {
1010
let attempt = std::str::from_utf8(req.body()).unwrap();
11-
let expected = variables::get("password").expect("could not get variable");
11+
let expected = variables::get("password").context("could not get variable")?;
1212
let response = if expected == attempt {
1313
"accepted"
1414
} else {

0 commit comments

Comments
 (0)