Closed celsocontim closed 1 year ago
Well, this works exactly as expected, as you don't call Notify Telegram
directly, you wrap it instead with the Run Keyword And Return Status
which will never fail (thus status is always True
), because Notify Telegram
doesn't raise in this case and returns a status instead, according to the response handler logic:
def _handle_response(self, response) -> bool:
if response.status == "Success":
self.logger.info("Notify %s resulted in Success", response.provider)
return True
else:
self.logger.error("Notify errors: %s", response.errors)
return False
To fix it, you have two options:
Run Keyword And Return Status
wrapper and use the status received when calling directly the keyword.Run Keyword And Ignore Error
and pay attention to the second return value:
I'll be closing this now as it doesn't look like an issue/bug with our library.
When the telegram notification is blocked due to network restrictions, it throws the error:
However, the return value of the keyword is still True, as can be seen in the screenshot attached.
RPAFramework 23.1.0 Python 3.10.7 OS Windows 10 Pro