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
|
||||
}
|
||||
|
||||
// if getSafeInfo does not provide data, it's not a valid safe.
|
||||
const safeInfo = await getSafeInfo(address)
|
||||
// If getSafeInfo does not provide data, it's not a valid safe.
|
||||
const safeInfo = await getSafeInfo(address).catch(() => null)
|
||||
if (!safeInfo) {
|
||||
errors[FIELD_LOAD_ADDRESS] = SAFE_ADDRESS_NOT_VALID
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue