Skip to content

Commit 650c1c9

Browse files
committed
address PR feedback
1 parent 92884ef commit 650c1c9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/event-handler/src/rest/Router.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ class Router {
7979
* Registers a custom error handler for specific error types.
8080
*
8181
* @param errorType - The error constructor(s) to handle
82-
* @param handler - The error handler function that returns a Promise<ErrorResponse>
82+
* @param handler - The error handler that returns an
83+
* error response>
8384
*/
8485
public errorHandler<T extends Error>(
8586
errorType: ErrorConstructor<T> | ErrorConstructor<T>[],
@@ -106,7 +107,8 @@ class Router {
106107
/**
107108
* Registers a custom handler for 404 Not Found errors.
108109
*
109-
* @param handler - The error handler function that returns a Promise<ErrorResponse>
110+
* @param handler - The error handler that returns an error
111+
* response
110112
*/
111113
public notFound(handler: ErrorHandler<NotFoundError>): void;
112114
public notFound(): MethodDecorator;
@@ -127,7 +129,7 @@ class Router {
127129
/**
128130
* Registers a custom handler for 405 Method Not Allowed errors.
129131
*
130-
* @param handler - The error handler function that returns a Promise<ErrorResponse>
132+
* @param handler - The error handler that returns an error response
131133
*/
132134
public methodNotAllowed(handler: ErrorHandler<MethodNotAllowedError>): void;
133135
public methodNotAllowed(): MethodDecorator;

0 commit comments

Comments
 (0)