Refactror the error handling methods on the editor instance