refactors intercept_method error handling