ctimmerm / axios-mock-adapter

Axios adapter that allows to easily mock requests
MIT License
3.47k stars 245 forks source link

Why all my requests are blocked? #375

Closed janswist closed 3 months ago

janswist commented 1 year 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 8 months ago

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