fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -79,12 +79,10 @@ export default function ArticleEditor({
|
||||
body: JSON.stringify(form.data),
|
||||
},
|
||||
);
|
||||
const data = await response
|
||||
.json()
|
||||
.catch(() => ({
|
||||
message:
|
||||
'Não foi possível abrir a prévia. Recupere o editor e confirme a sessão e o MFA existentes.',
|
||||
}));
|
||||
const data = await response.json().catch(() => ({
|
||||
message:
|
||||
'Não foi possível abrir a prévia. Recupere o editor e confirme a sessão e o MFA existentes.',
|
||||
}));
|
||||
if (!response.ok)
|
||||
throw new Error(
|
||||
Object.values(data.errors ?? {})
|
||||
|
||||
Reference in New Issue
Block a user