handle errors from conts