Add error method check to resource/permission in dispatch event