Fix missing var in error handling

Some of the required context stuff broken recently. :cry: