Should this be deleted inside the `if query?` conditional? Otherwise if it is not found, the id will still be available in the error block.