Handle on_error key