Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer committed May 29, 2024
1 parent 18fefe0 commit 7e64343
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ where
let message = format!("No API matches /{}", path[1..].join("/"));
return Ok(Self::top_level_error(req, StatusCode::NotFound, message));
};
if module.versions.contains_key(&version) {
if !module.versions.contains_key(&version) {
// This version is not supported, list suported versions.
return Ok(html! {
"Unsupported version v" (version) ". Supported versions are:"
Expand Down Expand Up @@ -1526,7 +1526,10 @@ mod test {
tracing::info!(?res, "<-");
assert_eq!(res.status(), expected_status);
let bytes = res.bytes().await.unwrap();
S::deserialize(&bytes)
anyhow::Context::context(
S::deserialize(&bytes),
format!("failed to deserialize bytes {bytes:?}"),
)
}

#[tracing::instrument(skip(client))]
Expand Down

0 comments on commit 7e64343

Please sign in to comment.