add errors boilerplate