Changing error handling to pass store certification