Repository: hyperledger/aries-cloudagent-python

Issue:
Connectionless OOB with attachments results in attribute error
As reported by @nodlesh after errors seen in AATH:

> Since approximately April 9th the AATH OOB tests have been failing. These tests have credential V1 or V2 or proof V1 or V2 attachments. There is an error that happens on the receiver/holder agent on the receive-invitation. I’m getting an internal server error. See stack trace below.

```python
2024-04-16 14:25:11,018 aiohttp.server ERROR Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 181, in ready_middleware
    return await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 218, in debug_middleware
    return await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 451, in setup_context
    return await task
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 284, in __await__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
    future.result()
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/usr/local/lib/python3.9/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
    return await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/protocols/out_of_band/v1_0/routes.py", line 324, in invitation_receive
    result = await oob_mgr.receive_invitation(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/protocols/out_of_band/v1_0/manager.py", line 817, in receive_invitation
    await self._process_request_attach(oob_record)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/protocols/out_of_band/v1_0/manager.py", line 836, in _process_request_attach
    await message_processor.handle_message(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/oob_processor.py", line 360, in handle_message
    oob_record.their_service = their_service.serialize()
AttributeError: can't set attribute
```

This is a result of changes made in 7f5eae76b1, part of #2862. The `setter` for an attribute turned into a property was omitted.


Discussion:

Resolving patch:
diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py b/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py
--- a/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py
+++ b/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py
@@ -113,6 +113,11 @@ def their_service(self) -> Optional[ServiceDecorator]:
         """Accessor; get deserialized view."""
         return None if self._their_service is None else self._their_service.de
 
+    @their_service.setter
+    def their_service(self, value: Union[ServiceDecorator, Mapping[str, Any]]):
+        """Setter; store de/serialized vies."""
+        self._their_service = ServiceDecorator.serde(value)
+
     @property
     def record_value(self) -> dict:
         """Accessor for the JSON record value generated for this invitation."""


Test patch: