Fixed error handling for getAll