Skip to content

Commit

Permalink
fix: telemetry check for type failing in delete
Browse files Browse the repository at this point in the history
  • Loading branch information
mwfarb committed Feb 21, 2024
1 parent 1c78cd1 commit 31916f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arena/scene.py
Expand Up @@ -488,7 +488,10 @@ async def _delayed_task():

def _publish(self, obj, action, custom_payload=False):
"""Publishes to mqtt broker with "action":action"""
with self.telemetry.start_publish_span(obj["object_id"], action, obj["type"]) as span:
obj_type = None
if "type" in obj:
obj_type = obj["type"]
with self.telemetry.start_publish_span(obj["object_id"], action, obj_type) as span:
if not self.can_publish:
self.telemetry.set_error(f"ERROR: Publish failed! You do not have permission to publish to topic {self.root_topic} on {self.web_host}", span)

Expand Down

0 comments on commit 31916f3

Please sign in to comment.