We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0de4210 commit 2ba444cCopy full SHA for 2ba444c
1 file changed
app/msw-mock-api.ts
@@ -84,15 +84,8 @@ export async function startMockAPI() {
84
// pass through to the server
85
onUnhandledRequest(req) {
86
const path = new URL(req.url).pathname
87
- // Files that get pulled in dynamic imports. It is expected that MSW will
88
- // not handle them and they fall through to the dev server, so warning
89
- // about them is just noise.
90
- const ignore = [
91
- path.startsWith('/app'),
92
- path.startsWith('/libs'),
93
- path.startsWith('/node_modules'),
94
- ].some(Boolean)
95
- if (!ignore) {
+ // only warn on unhandled requests that are actually to API paths
+ if (path.startsWith('/v1/')) {
96
// message format copied from MSW source
97
console.warn(`[MSW] Warning: captured an API request without a matching request handler:
98
0 commit comments