avoid code duplication and catch correct error