adding return type to private error handling method to appease xcode's static analyser