Fix multiple typos in medusa docs (#5854)
This commit is contained in:
@@ -546,13 +546,13 @@ After using `MedusaError`, the returned error in the response provides a clearer
|
||||
- `MedusaError.Types.DB_ERROR`: Sets the response code to `500`.
|
||||
- `MedusaError.Types.DUPLICATE_ERROR`: Sets the response code to `422`.
|
||||
- `MedusaError.Types.INVALID_ARGUMENT`
|
||||
- `MedusaError.Types.INVALID_DATA`: Sets the resposne code to `400`.
|
||||
- `MedusaError.Types.UNAUTHORIZED`: Sets the resposne code to `401`.
|
||||
- `MedusaError.Types.INVALID_DATA`: Sets the response code to `400`.
|
||||
- `MedusaError.Types.UNAUTHORIZED`: Sets the response code to `401`.
|
||||
- `MedusaError.Types.NOT_FOUND`: Sets the response code to `404`.
|
||||
- `MedusaError.Types.NOT_ALLOWED`: Sets the resposne code to `400`.
|
||||
- `MedusaError.Types.NOT_ALLOWED`: Sets the response code to `400`.
|
||||
- `MedusaError.Types.UNEXPECTED_STATE`
|
||||
- `MedusaError.Types.CONFLICT`: Sets the resposne code to `409`.
|
||||
- `MedusaError.Types.PAYMENT_AUTHORIZATION_ERROR`: Sets the resposne code to `422`.
|
||||
- `MedusaError.Types.CONFLICT`: Sets the response code to `409`.
|
||||
- `MedusaError.Types.PAYMENT_AUTHORIZATION_ERROR`: Sets the response code to `422`.
|
||||
|
||||
</Details>
|
||||
|
||||
@@ -603,7 +603,7 @@ export const GET = wrapHandler(async (
|
||||
req: MedusaRequest,
|
||||
res: MedusaResponse
|
||||
): Promise<void> => {
|
||||
throw new Error("An error occured")
|
||||
throw new Error("An error occurred")
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
@@ -55,7 +55,7 @@ If you run into any errors while installing the CLI tool, check out the [trouble
|
||||
medusa new my-medusa-store # or npx @medusajs/medusa-cli new
|
||||
```
|
||||
|
||||
You'll then be asked to specify your PostgreSQL database credentials. You can choose "Continue" to use the default credentials shown in the terminal, choose "Change credentials" to specify your PostgreSQL credentails, or choose "Skip database setup" to create the database later.
|
||||
You'll then be asked to specify your PostgreSQL database credentials. You can choose "Continue" to use the default credentials shown in the terminal, choose "Change credentials" to specify your PostgreSQL credentials, or choose "Skip database setup" to create the database later.
|
||||
|
||||
:::warning
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ In this document, you'll learn what repositories are, how to use them within you
|
||||
|
||||
Repositories provide generic helper methods for entities. For example, you can use the `find` method to retrieve all entities with pagination, or `findOne` to retrieve a single entity record.
|
||||
|
||||
Repostories are [Typeorm repositories](https://typeorm.io/working-with-repository), so you can refer to Typeorm's documentation on all available methods.
|
||||
Repositories are [Typeorm repositories](https://typeorm.io/working-with-repository), so you can refer to Typeorm's documentation on all available methods.
|
||||
|
||||
By default, you don't need to create a repository for your custom entities. You can retrieve the default repository of an entity using the Entity Manager. You should only create a repository if you want to implement custom methods in it.
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ The exported configuration object of type `SubscriberConfig` must include the fo
|
||||
|
||||
### Subscriber Handler Function
|
||||
|
||||
The default-export of the subscriber file is a handler function that is executed when the events specified in the exported configuration is triggerd.
|
||||
The default-export of the subscriber file is a handler function that is executed when the events specified in the exported configuration is triggered.
|
||||
|
||||
The function accepts a parameter of type `SubscriberArgs`, which has the following properties:
|
||||
|
||||
@@ -88,7 +88,7 @@ If you don't pass a subscriber ID to the subscriber configurations, the name of
|
||||
|
||||
## Caveats for Local Event Bus
|
||||
|
||||
If you use the `event-bus-local` as your event bus sevice, note the following:
|
||||
If you use the `event-bus-local` as your event bus service, note the following:
|
||||
|
||||
- The `subscriberId` passed in the context is overwritten to a random ID when using `event-bus-local`. So, setting the subscriber ID in the context won't have any effect in this case.
|
||||
- The `eventName` passed to the handler function will be `undefined` when using `event-bus-local` as it doesn't pass the event name properly.
|
||||
|
||||
@@ -112,7 +112,7 @@ Object of the following format:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Triggered after the `preProcessBatchJob` of a batch job stategy is done executing.
|
||||
Triggered after the `preProcessBatchJob` of a batch job strategy is done executing.
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@@ -2012,7 +2012,7 @@ In addition, an error object is passed within the same object as the Payment Pro
|
||||
//... other payment fields
|
||||
error: {
|
||||
name, //string
|
||||
nessage, //string
|
||||
message, //string
|
||||
stack, //(optional) string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ Every fulfillment provider is registered under two names:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
By default, it's `SINGLETON` unless defined differently within the fulfillemnt provider service.
|
||||
By default, it's `SINGLETON` unless defined differently within the fulfillment provider service.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -110,7 +110,7 @@ export default async (
|
||||
await productService.count()
|
||||
}`)
|
||||
} catch (e) {
|
||||
logger.failure(activityId, `An error occurrect: ${e}`)
|
||||
logger.failure(activityId, `An error occurred: ${e}`)
|
||||
}
|
||||
|
||||
logger.success(activityId, "Ending loader")
|
||||
|
||||
@@ -80,7 +80,7 @@ You can retrieve a list of publishable API keys by sending a request to the [Lis
|
||||
import { PublishableApiKey } from "@medusajs/medusa"
|
||||
import { useAdminPublishableApiKeys } from "medusa-react"
|
||||
|
||||
const PublishabelApiKeys = () => {
|
||||
const PublishableApiKeys = () => {
|
||||
const { publishable_api_keys, isLoading } =
|
||||
useAdminPublishableApiKeys()
|
||||
|
||||
@@ -106,7 +106,7 @@ You can retrieve a list of publishable API keys by sending a request to the [Lis
|
||||
)
|
||||
}
|
||||
|
||||
export default PublishabelApiKeys
|
||||
export default PublishableApiKeys
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
@@ -85,7 +85,7 @@ You can see examples of scheduled job expression patterns on [crontab guru](http
|
||||
|
||||
### Scheduled Job Handler Function
|
||||
|
||||
The default-export of the scheduled job file is a handler function that is executed when the events specified in the exported configuration is triggerd.
|
||||
The default-export of the scheduled job file is a handler function that is executed when the events specified in the exported configuration is triggered.
|
||||
|
||||
The function accepts a parameter of type `ScheduledJobArgs`, which has the following properties:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user