mux icon indicating copy to clipboard operation
mux copied to clipboard

[BUG] Inconsistent HTTP status code on query mismatch

Open soheilrt opened this issue 2 years ago • 0 comments

The logical behavior of a router should return an HTTP status code of 404 when a request fails to satisfy route validation logic. Previously, MUX was returning a 405 HTTP status code in some rare scenarios, which was not valid in its case.

For more info, See: https://github.com/gorilla/mux/issues/704

Fixes #704

Summary of Changes

  1. Clear the mismatch error of the previous validations on method match.
  2. Added related tests

PS: Make sure your PR includes/updates tests! If you need help with this part, just ask!

soheilrt avatar Jul 14 '23 17:07 soheilrt