function-buildpacks-for-knative
function-buildpacks-for-knative copied to clipboard
Python invoker throws exception when the function returns just data without attributes
Bug Report
Running a function that expects cloudevents where after processing returns only the body will cause it to throw an exception.
Expected Behavior
No errors + proper attributes are returned.
Steps to Reproduce the Bug
- Define a function:
from typing import Any def main(data: Any, attributes: dict): # Your function implementation goes here return data
- Run this function with the Python invoker.
- Send a CE via curl to function.