We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4eb8c60 commit d86c441Copy full SHA for d86c441
client/src/pages/Home.tsx
@@ -31,8 +31,9 @@ export default function HomePage() {
31
let errorMessage = "イベントの取得に失敗しました。";
32
try {
33
const data = await res.json();
34
- if (data && typeof data.message === "string" && data.message.trim()) {
35
- errorMessage = data.message.trim();
+ const err = data as unknown as { message: string }; // Middleware のレスポンスは Hono RPC の型に乗らない
+ if (typeof err.message === "string" && err.message.trim()) {
36
+ errorMessage = err.message.trim();
37
}
38
} catch (_) {
39
// レスポンスがJSONでない場合は無視
0 commit comments