`err` should be set here