optimize `errors` property