docs: update imports and package names across docs (#9375)

* docs: update imports and package names across docs
+ reference configs

* generate files

* fix import

* change preview to rc
This commit is contained in:
Shahed Nasser
2024-10-01 11:03:42 +02:00
committed by GitHub
parent c726ed54f5
commit 2e16949979
196 changed files with 1379 additions and 1491 deletions
@@ -10,7 +10,7 @@ In this guide, you'll learn how to throw errors in your Medusa application, how
## Throw MedusaError
When throwing an error in your API routes, middlewares, workflows, or any customization, throw a `MedusaError`, which is imported from `@medusajs/utils`.
When throwing an error in your API routes, middlewares, workflows, or any customization, throw a `MedusaError`, which is imported from `@medusajs/framework/utils`.
The Medusa application's API route error handler then wraps your thrown error in a uniform object and returns it in the response.
@@ -18,7 +18,7 @@ For example:
```ts
import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
import { MedusaError } from "@medusajs/utils"
import { MedusaError } from "@medusajs/framework/utils"
export const GET = async (
req: MedusaRequest,
@@ -258,7 +258,7 @@ import {
MedusaRequest,
MedusaResponse,
} from "@medusajs/medusa"
import { MedusaError } from "@medusajs/utils"
import { MedusaError } from "@medusajs/framework/utils"
export default defineMiddlewares({
errorHandler: (