mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 05:06:55 +00:00
render server errors
This commit is contained in:
@@ -33,6 +33,9 @@ const secureHeaders = [
|
|||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
|
reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
|
||||||
swcMinify: true,
|
swcMinify: true,
|
||||||
|
experimental: {
|
||||||
|
serverComponentsErrorOverride: true,
|
||||||
|
},
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,18 +46,13 @@ export default function UsernameForm({
|
|||||||
async function submitLoginName(values: Inputs, organization?: string) {
|
async function submitLoginName(values: Inputs, organization?: string) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
let res;
|
const res = await sendLoginname({
|
||||||
try {
|
loginName: values.loginName,
|
||||||
res = await sendLoginname({
|
organization,
|
||||||
loginName: values.loginName,
|
authRequestId,
|
||||||
organization,
|
}).catch((error: Error) => {
|
||||||
authRequestId,
|
setError(error.message ?? "An internal error occurred");
|
||||||
});
|
});
|
||||||
} catch (error: unknown) {
|
|
||||||
if (error instanceof Error) {
|
|
||||||
setError(error.message ?? "An internal error occurred");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user