use the same context when handling errors