fix(medusa): Error handling middleware should be applied when no config is exported (#5634)

**What**
- Fixes an issue where the default errorHandler middleware was not applied if the user did not have a `middlewares.ts` file.
- Updates the type of `MiddlewaresConfig` so `middlewares` is now optional, as people might want to only set a bodyParser config for a matcher and not provide any additional middleware.
This commit is contained in:
Kasper Fabricius Kristensen authored and GitHub committed 2023-11-14 20:48:10 +00:00
1 parent 7226f5b699
commit 52800710a2
3 files changed
+11 -7

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(medusa): Ensure that errorHandler middleware is applied if no middleware config exists