Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71e76eb

Browse files
committed
add workaround for empty type url in message decoding
1 parent e5d4718 commit 71e76eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/agrirouter/service/messaging/decoding.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def decode_details(details: Any):
7676
push_notification = PushNotification()
7777
push_notification.MergeFromString(details.value)
7878
return push_notification
79+
elif not details.type_url:
80+
# mainly a workaround for agrirouter 2 bug: https://github.com/DKE-Data/agrirouter/issues/11
81+
return None
7982
else:
80-
8183
raise CanNotDecodeMessage(f"Could not handle type {details.type_url} while decoding details.")

0 commit comments

Comments
 (0)