Skip to content

Commit 3acb59d

Browse files
committed
feat(interceptor): update the error message
1 parent 99a9225 commit 3acb59d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mikro-flusher.interceptor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export class MikroFlusherInterceptor implements NestInterceptor {
2929
if (operation != "mutation") return next.handle();
3030

3131
const context = MikroFlusherContext.current;
32-
if (!context) throw new Error();
32+
if (!context)
33+
throw new Error("The middleware must be applied for this route");
3334

3435
context.mutationCountTotal++;
3536

0 commit comments

Comments
 (0)