Skip to content

Commit

Permalink
fix: return 404 on no matching ops in the mock
Browse files Browse the repository at this point in the history
  • Loading branch information
stevana committed Nov 18, 2024
1 parent a7201a9 commit 45e0a6b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Spex/Mock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ matchOp ctx req =
let ops' = filter (\op -> op.method `methodsMatch` requestMethod req) ctx
ops'' = filter (\op -> op.path `pathMatch` pathInfo req) ops'
in case ops'' of
[] -> Nothing
[op] -> Just (op.responseType)
_ ->
-- XXX: we should check for this when checking the spec...
Expand Down

0 comments on commit 45e0a6b

Please sign in to comment.