You can break this error handling logic into a separate method to get this back under the cane threshold.