Skip to content

Commit

Permalink
fix: Return as error
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Nov 24, 2024
1 parent 7f22762 commit 4a4a60f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/routes/htmx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* This module is to manage routes for Web API (not render html and images).
*/
import { Hono } from 'hono';
import type { StatusCode } from 'hono/utils/http-status';
import { AppMessageBox } from '../components/layouts';
import { zValidator } from '@hono/zod-validator';
import { ContentAddress } from '../models';
Expand Down Expand Up @@ -35,6 +36,7 @@ app.post('/content-url', zValidator('json', ContentAddress), async (c) => {
</AppMessageBox>,
);
}
c.status(resp.status as StatusCode);
return c.html(
<AppMessageBox title="Error!" type="danger">
<p>{await resp.text()}</p>
Expand Down

0 comments on commit 4a4a60f

Please sign in to comment.