handle dispatch errors