diff --git a/packages/backend/src/utils/error/api/APIError.ts b/packages/backend/src/utils/error/api/APIError.ts index 41b2ee14a..c268ee7c4 100644 --- a/packages/backend/src/utils/error/api/APIError.ts +++ b/packages/backend/src/utils/error/api/APIError.ts @@ -1,10 +1,10 @@ -import type { StatusCode } from "hono/utils/http-status"; +import type { ContentfulStatusCode } from "hono/utils/http-status"; /** * This class is used to throw errors in the application which are associated with an HTTP status code. */ abstract class APIError extends Error { - status: StatusCode; + status: ContentfulStatusCode; /** * Creates a new instance of the {@link APIError} class. @@ -12,7 +12,7 @@ abstract class APIError extends Error { * @param message A descriptive message for the error. * @param cause The error that caused this error. */ - constructor(httpStatus: StatusCode, message: string, cause?: Error) { + constructor(httpStatus: ContentfulStatusCode, message: string, cause?: Error) { super(message, { cause }); Error.captureStackTrace(this, this.constructor); this.message = message; diff --git a/packages/backend/src/utils/error/errorHelper.ts b/packages/backend/src/utils/error/errorHelper.ts index 676abb201..089bdb466 100644 --- a/packages/backend/src/utils/error/errorHelper.ts +++ b/packages/backend/src/utils/error/errorHelper.ts @@ -1,6 +1,6 @@ import type { Hook } from "@hono/zod-openapi"; import type { Env, ErrorHandler } from "hono"; -import type { StatusCode } from "hono/utils/http-status"; +import type { ContentfulStatusCode } from "hono/utils/http-status"; import { ZodError } from "zod"; import { fromError, ValidationError } from "zod-validation-error"; @@ -21,7 +21,7 @@ class ErrorHelper { static errorHandler: ErrorHandler = (err, c) => { Logger.error(err); // Log the error - let statusCode: StatusCode = 500; + let statusCode: ContentfulStatusCode = 500; let message = err.message; if (err instanceof APIError) statusCode = err.status; diff --git a/packages/wasm/package.json b/packages/wasm/package.json index d288716b5..9e49f2d87 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -23,4 +23,4 @@ "./wasm.js", "./snippets/*" ] -} \ No newline at end of file +}