Return correct error code when adding invalid status