Akmal Dira
Akmal Dira
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Akmal Dira on 8/14/2024 in #questions
Everyone help me, how to handle server component error?
Code:
import { api, HydrateClient } from "@/trpc/server";
import { columns } from "./columns";
import { DataTable } from "./data-table";

export default async function SourcePage() {
const sources = await api.source.getAll();
// Sources will throwing an error (bad request, unauthorized, forbidden, etc)
return (
<HydrateClient>
<div className="">
<h1>Source Page</h1>
<DataTable columns={columns} data={sources} />
</div>
</HydrateClient>
);
}
import { api, HydrateClient } from "@/trpc/server";
import { columns } from "./columns";
import { DataTable } from "./data-table";

export default async function SourcePage() {
const sources = await api.source.getAll();
// Sources will throwing an error (bad request, unauthorized, forbidden, etc)
return (
<HydrateClient>
<div className="">
<h1>Source Page</h1>
<DataTable columns={columns} data={sources} />
</div>
</HydrateClient>
);
}
If i create error.tsx in that route, on production i cant see the original error message
2 replies
TtRPC
Created by Akmal Dira on 8/11/2024 in #❓-help
How to add signal on mutateAsync?
const stream = await ask.mutateAsync(data);
const stream = await ask.mutateAsync(data);
i want to parse signal there
2 replies
TtRPC
Created by Akmal Dira on 8/10/2024 in #❓-help
createTRPCReact call 3 time on error
No description
2 replies