check that `error` exists