mirror of
https://github.com/grassrootseconomics/farmstar-survey-ui.git
synced 2025-01-23 13:57:36 +01:00
fix: error messages
This commit is contained in:
parent
a4da7fe015
commit
e55900a7e4
@ -151,7 +151,8 @@ const formSubmitted = ref(false);
|
||||
const handleResponse = async (response, form$) => {
|
||||
if (response.status <= 201) {
|
||||
formSubmitted.value = true;
|
||||
} else {
|
||||
} else if (response.status >= 400) {
|
||||
form$.messageBag.append(response.data?.message);
|
||||
form$.messageBag.append(response.data?.error);
|
||||
if (Object.keys(response.data.data)[0]?.message) {
|
||||
form$.messageBag.append(
|
||||
|
@ -420,7 +420,8 @@ const formSubmitted = ref(false);
|
||||
const handleResponse = async (response, form$) => {
|
||||
if (response.status <= 201) {
|
||||
formSubmitted.value = true;
|
||||
} else {
|
||||
} else if (response.status >= 400) {
|
||||
form$.messageBag.append(response.data?.message);
|
||||
form$.messageBag.append(response.data?.error);
|
||||
if (Object.keys(response.data.data)[0]?.message) {
|
||||
form$.messageBag.append(
|
||||
|
@ -81,6 +81,7 @@ const handleResponse = async (response, form$) => {
|
||||
if (response.status <= 201) {
|
||||
formSubmitted.value = true;
|
||||
} else if (response.status >= 400) {
|
||||
form$.messageBag.append(response.data?.message);
|
||||
form$.messageBag.append(response.data?.error);
|
||||
if (Object.keys(response.data.data)[0]?.message) {
|
||||
form$.messageBag.append(
|
||||
|
@ -82,6 +82,7 @@ const handleResponse = async (response, form$) => {
|
||||
formSubmitted.value = true;
|
||||
} else if (response.status >= 400) {
|
||||
form$.messageBag.append(response.data?.message);
|
||||
form$.messageBag.append(response.data?.error);
|
||||
if (Object.keys(response.data.data)[0]?.message) {
|
||||
form$.messageBag.append(
|
||||
Object.keys(response.data.data)[0] +
|
||||
|
Loading…
Reference in New Issue
Block a user