docs: add troubleshooting for middlewares (#13764)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-10-16 14:43:21 +03:00
1 parent e36c054780
commit ee2734c23d
4 files changed
+22 -2

No files matched your search

+10
View File
@@ -1384,6 +1384,12 @@ This returns the created brand in the response:
}
```
### Troubleshooting
#### Returned Empty Array
If you sent a request to the API route and received an empty array in the response, make sure you've correctly created the middleware at `src/api/middlewares.ts` (with correct spelling). This is a common mistake that can lead to the middleware not being applied, resulting in unexpected behavior.
***
## Summary
@@ -8180,6 +8186,10 @@ npm run dev
Received a request!
```
### Troubleshooting
If the middleware didn't run, make sure you've correctly created the middleware at `src/api/middlewares.ts` (with correct spelling). This is a common mistake that can lead to the middleware not being applied, resulting in unexpected behavior.
***
## When to Use Middlewares