render server errors

This commit is contained in:
peintnermax
2024-09-16 14:03:39 +02:00
parent db7eec6cad
commit 7126f86c33
2 changed files with 10 additions and 12 deletions

View File

@@ -33,6 +33,9 @@ const secureHeaders = [
const nextConfig = {
reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
swcMinify: true,
experimental: {
serverComponentsErrorOverride: true,
},
images: {
remotePatterns: [
{

View File

@@ -46,18 +46,13 @@ export default function UsernameForm({
async function submitLoginName(values: Inputs, organization?: string) {
setLoading(true);
let res;
try {
res = await sendLoginname({
const res = await sendLoginname({
loginName: values.loginName,
organization,
authRequestId,
});
} catch (error: unknown) {
if (error instanceof Error) {
}).catch((error: Error) => {
setError(error.message ?? "An internal error occurred");
}
}
});
setLoading(false);