Closed mkhan45 closed 2 years ago
e.g.
let %{ "type" => type, "title" => title, "url" => url, "password" => password } = gen_state(:body) |> parse_urlencoded
This line fails if gen_state(:body) doesn't match the pattern, crashing the program. Instead, I should be able to use:
gen_state(:body)
with let %{ "type" => type, "title" => title, "url" => url, "password" => password } = gen_state(:body) |> parse_urlencoded { } else { .... }
e.g.
This line fails if
gen_state(:body)
doesn't match the pattern, crashing the program. Instead, I should be able to use: