mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 06:42:59 +00:00
render server errors
This commit is contained in:
@@ -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: [
|
||||
{
|
||||
|
||||
@@ -46,18 +46,13 @@ export default function UsernameForm({
|
||||
async function submitLoginName(values: Inputs, organization?: string) {
|
||||
setLoading(true);
|
||||
|
||||
let res;
|
||||
try {
|
||||
res = await sendLoginname({
|
||||
loginName: values.loginName,
|
||||
organization,
|
||||
authRequestId,
|
||||
});
|
||||
} catch (error: unknown) {
|
||||
if (error instanceof Error) {
|
||||
setError(error.message ?? "An internal error occurred");
|
||||
}
|
||||
}
|
||||
const res = await sendLoginname({
|
||||
loginName: values.loginName,
|
||||
organization,
|
||||
authRequestId,
|
||||
}).catch((error: Error) => {
|
||||
setError(error.message ?? "An internal error occurred");
|
||||
});
|
||||
|
||||
setLoading(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user