page-163a81697dacd890.js:1 Uncaught (in promise) Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.
i dont know why its giving me this error though i have pretty simple code
HomePage.tsx
export default function HomePage()
{
const handleGetSections = async () => {
const response = await GetSection(`${window.location.origin}/api/section/get`);
console.log(response);
}
return (
<div className='dark:bg-black min-h-screen max-h-auto no-scrollbar overflow-y-auto'>
<h1 className="text-center text-4xl mt-10">CRUD OPERATION WITH SERVER ACTION</h1>
<button className="border-none outline-none px-4 py-2 rounded-lg bg-neutral-900" onClick={handleGetSections}>Get Secitons</button>
</div>
)
}```
action.ts
```"use server"
import { revalidatePath } from "next/cache";
export async function GetSection (url : string)
{
const response = await fetch(url, {
method : 'GET',
cache : 'no-store',
next : { revalidate : 0 }
})
const resJson = await response.json();
revalidatePath('/');
return resJson;
}