Extract error lookup into methods