Fix "shadowed local variables" warning

Otherwise the block to save the parent context will capture the success and error variables from the main context save.