added a error handling method to the creation schema