Implement better error handling in the ProjectHandler