error handling for create and update entry