Skip to content

Commit 2acf566

Browse files
authored
Handle None for parse_inbound (#517)
parse_inbound takes the `message` from `self._parse_inbound`, which can in some cases be None, causing issues when we try to access `.url` and `.text` off it.
1 parent c56697d commit 2acf566

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/steamship/agents/mixins/transports/transport.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def _send(self, blocks: List[Block], metadata: Metadata):
5656

5757
def parse_inbound(self, payload: dict, context: Optional[dict] = None) -> Optional[Block]:
5858
message = self._parse_inbound(payload, context)
59+
if not message:
60+
return None
5961

6062
if message.url and not message.text:
6163
context = AgentContext()

0 commit comments

Comments
 (0)