@kiyasov/platform-hono 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -153,16 +153,14 @@ export class HonoAdapter extends AbstractHttpAdapter<
|
|
|
153
153
|
public setErrorHandler(handler: ErrorHandler) {
|
|
154
154
|
this.instance.onError(async (err: Error, ctx: Context) => {
|
|
155
155
|
await handler(err, ctx.req, ctx);
|
|
156
|
-
|
|
157
|
-
return typeof body === "string" ? ctx.text(body) : ctx.json(body);
|
|
156
|
+
return this.send(ctx);
|
|
158
157
|
});
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
public setNotFoundHandler(handler: RequestHandler) {
|
|
162
161
|
this.instance.notFound(async (ctx: Context) => {
|
|
163
162
|
await handler(ctx.req, ctx);
|
|
164
|
-
|
|
165
|
-
return typeof body === "string" ? ctx.text(body) : ctx.json(body);
|
|
163
|
+
return this.send(ctx);
|
|
166
164
|
});
|
|
167
165
|
}
|
|
168
166
|
|