Make BaseResponse a contextmanager