const data = {
"accounts": addresses
}
- const { errors } = await rpc.post('accounts_frontiers', data)
- if (errors != null) {
+ const res = await rpc.post('accounts_frontiers', data)
+ if (res != null && typeof res === 'object' && 'errors' in res && res.errors != null && typeof res.errors === 'object') {
+ const errors = res.errors as Record<string, unknown>
for (const a of addresses) {
const value = errors[a]
if (value === 'Account not found') {