The original code was not handling `err` in this case, so I left it as-is.