add error handling to controllers
model tests complete