Last active
April 18, 2021 01:04
-
-
Save ricardolsmendes/1a29701f57d102874d38454bcb035545 to your computer and use it in GitHub Desktop.
Raising exceptions with Azure Durable Functions in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(data: Dict[str, Any]) -> Dict[str, Any]: | |
if not data: | |
raise Exception('The funds transfer data is mandatory') | |
if not data.get('sourceAccount'): | |
raise Exception('The Source Account is mandatory') | |
if not data.get('targetAccount'): | |
raise Exception('The Target Account is mandatory') | |
return data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment