Skip to content

Commit d05f6e0

Browse files
committed
fix minor example and wording
1 parent 4337323 commit d05f6e0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: packages/parser/src/errors.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
2-
* Error thrown when a parsing error occurs. The cause of the error is included in the message, if possible.
2+
* Custom parsing error that wraps any erros thrown during schema or envelope parsing.
3+
* The cause of the error is included in the message, if possible.
34
*/
45
class ParseError extends Error {
56
/**

Diff for: packages/parser/src/parserDecorator.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import type { ParserOptions, ParsedResult } from './types/index.js';
2222
*
2323
* class Lambda implements LambdaInterface {
2424
*
25-
* @parser({ envelope: SqsEnvelope, schema: OrderSchema })
25+
* @parser({ envelope: SqsEnvelope, schema: OrderSchema })
2626
* public async handler(event: Order, _context: Context): Promise<unknown> {
2727
* // sqs event is parsed and the payload is extracted and parsed
2828
* // apply business logic to your Order event
@@ -53,7 +53,7 @@ import type { ParserOptions, ParsedResult } from './types/index.js';
5353
*
5454
* class Lambda implements LambdaInterface {
5555
*
56-
* ⁣git@parser({ envelope: SqsEnvelope, schema: OrderSchema, safeParse: true })
56+
* @parser({ envelope: SqsEnvelope, schema: OrderSchema, safeParse: true })
5757
* public async handler(event: ParsedResult<Order>, _context: unknown): Promise<unknown> {
5858
* if (event.success) {
5959
* // event.data is the parsed event object of type Order

0 commit comments

Comments
 (0)