azure-functions-python-worker icon indicating copy to clipboard operation
azure-functions-python-worker copied to clipboard

Allow nil data for generic bindings

Open hallvictoria opened this issue 1 year ago • 1 comments

Description

Currently, when a function is triggered, the worker expects a request body with the trigger. However, in the case of generic binding types like the Dapr Cron binding trigger, no data is sent with the trigger request. This causes the worker to crash with an exception AttributeError: 'NoneType' object has no attribute 'type'. This fix enables triggers to execute successfully even if the trigger calls the app without any request body.

Fixes https://github.com/Azure/azure-functions-python-worker/issues/1316


PR information

  • [ ] The title of the PR is clear and informative.
  • [ ] There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • [ ] If applicable, the PR references the bug/issue that it fixes in the description.
  • [ ] New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

hallvictoria avatar Dec 11 '23 21:12 hallvictoria