Catch backend error and send controlled form error (#2324)
This commit is contained in:
parent
3e4c9cf7d3
commit
9119550373
|
@ -54,8 +54,8 @@ export const safeFieldsValidation = async (values): Promise<Record<string, strin
|
||||||
return errors
|
return errors
|
||||||
}
|
}
|
||||||
|
|
||||||
// if getSafeInfo does not provide data, it's not a valid safe.
|
// If getSafeInfo does not provide data, it's not a valid safe.
|
||||||
const safeInfo = await getSafeInfo(address)
|
const safeInfo = await getSafeInfo(address).catch(() => null)
|
||||||
if (!safeInfo) {
|
if (!safeInfo) {
|
||||||
errors[FIELD_LOAD_ADDRESS] = SAFE_ADDRESS_NOT_VALID
|
errors[FIELD_LOAD_ADDRESS] = SAFE_ADDRESS_NOT_VALID
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue