Don't fail with res is undefined, when there's an error.