Skip to content

Commit 841e69b

Browse files
committed
fix type error
1 parent 9b9ae6e commit 841e69b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ErrorResponse } from '../types/rest.js';
1+
import type { ErrorResponse, HttpStatusCode } from '../types/rest.js';
22
import { HttpErrorCodes } from './constants.js';
33

44
export class RouteMatchingError extends Error {
@@ -20,7 +20,7 @@ export class ParameterValidationError extends RouteMatchingError {
2020
}
2121

2222
abstract class ServiceError extends Error {
23-
abstract readonly statusCode: number;
23+
abstract readonly statusCode: HttpStatusCode;
2424
abstract readonly errorType: string;
2525
public readonly details?: Record<string, unknown>;
2626

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export type {
8888
ErrorResponse,
8989
ErrorConstructor,
9090
ErrorHandler,
91+
HttpStatusCode,
9192
HttpMethod,
9293
Path,
9394
RouterOptions,

0 commit comments

Comments
 (0)