Closed alexander-svendsen closed 5 years ago
wobs i had forgotten to set enableFallback: false
:P
But is it possible for the mock library to log that it did not find a match and is defaulting to the real fetch method ?
Maybe add the method (POST, GET etc) to the error msg when no path found ? Now i can configure a GET mock path to a POST and don't see a match, but only get an error message saying something about the url, which is the same
Solved in 2.4.1 (https://github.com/nutgaard/yet-another-fetch-mock/commit/a7e7e1a) Now logs a warning if fallback is enabled and no route-match is found, and added the http-verb to the existing error-message as well.
Hi,
Perhaps this is not desired, but its worth a issue creation.
I want to see an more general error in the console when i'm using the mock lib on a path not configured and
enableFallback: false
Now an JSON parse exception is thrown, because of the undefined response