Skip to content

Commit

Permalink
Update dependency hono to v4.6.15 (#1817)
Browse files Browse the repository at this point in the history
* Replace `StatusCode` with `ContentfulStatusCode`

Signed-off-by: Marvin A. Ruder <[email protected]>
  • Loading branch information
renovate[bot] authored Dec 28, 2024
1 parent bb776c5 commit 524af61
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@yarnpkg/pnpify": "4.1.3",
"emailjs": "4.0.3",
"esbuild": "0.24.2",
"hono": "4.6.14",
"hono": "4.6.15",
"hono-rate-limiter": "0.4.2",
"jmespath": "0.16.0",
"node-cron": "3.0.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/src/utils/error/api/APIError.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
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.
* @param httpStatus The HTTP status code associated with the 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;
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/utils/error/errorHelper.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@vitest/coverage-v8": "2.1.8",
"@vitest/web-worker": "2.1.8",
"hare-niemeyer": "3.0.0",
"hono": "4.6.14",
"hono": "4.6.15",
"http2-proxy": "5.0.53",
"ml-fcnnls": "3.0.0",
"ml-matrix": "6.12.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"./wasm.js",
"./snippets/*"
]
}
}
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ __metadata:
eslint-plugin-jsdoc: "npm:50.6.1"
eslint-plugin-prettier: "npm:5.2.1"
globals: "npm:15.14.0"
hono: "npm:4.6.14"
hono: "npm:4.6.15"
hono-rate-limiter: "npm:0.4.2"
jmespath: "npm:0.16.0"
node-cron: "npm:3.0.3"
Expand Down Expand Up @@ -1541,7 +1541,7 @@ __metadata:
eslint-plugin-react: "npm:7.37.3"
globals: "npm:15.14.0"
hare-niemeyer: "npm:3.0.0"
hono: "npm:4.6.14"
hono: "npm:4.6.15"
http2-proxy: "npm:5.0.53"
ml-fcnnls: "npm:3.0.0"
ml-matrix: "npm:6.12.0"
Expand Down Expand Up @@ -4824,10 +4824,10 @@ __metadata:
languageName: node
linkType: hard

"hono@npm:4.6.14":
version: 4.6.14
resolution: "hono@npm:4.6.14"
checksum: 10c0/891e4218a65668d78838187aceadef53abdd159be919a32a07d6af79678102915c5315f589ce252d9405025ac89d6242b1e243ef9e94e8b9080f50b3c6c13eb5
"hono@npm:4.6.15":
version: 4.6.15
resolution: "hono@npm:4.6.15"
checksum: 10c0/f6423705792037af85e95aadf512296db5b3cdc5aea15f13ae851df91a650bb9ca2b05ab2942570bd95b9cb080e375a1d12101367009fc95a5485789bf2067c8
languageName: node
linkType: hard

Expand Down

0 comments on commit 524af61

Please sign in to comment.