ctimmerm / axios-mock-adapter

Axios adapter that allows to easily mock requests
MIT License
3.42k stars 241 forks source link

Why all my requests are blocked? #375

Open janswist opened 11 months ago

janswist commented 11 months ago

I added just those two lines:

import MockAdapter from 'axios-mock-adapter'
const mock = new MockAdapter(axios, { onNoMatch: "throwException" })

and ALL of my endpoints stopped working. Is that by default?

suhaotian commented 3 months ago

Yeah, if no match, it will throw Exception, if you don't want that, can change to passthrough