You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect the above code to raise cloudevents.exceptions.MissingRequiredFields("...")
Actual Behavior
Instead it does raise cloudevents.exceptions.InvalidStructuredJSON("...")
I believe it does this because line 48 we check whether headers is binary and if not we assume this is a structured request and try to read as json.
Perhaps instead of raising InvalidStructuredJSON we should set specversion to None and outside the if statement raise MissingRequiredFields('can't find specversion and couldn't decode json').
The text was updated successfully, but these errors were encountered:
Expected Behavior
I would expect the above code to
raise cloudevents.exceptions.MissingRequiredFields("...")
Actual Behavior
Instead it does
raise cloudevents.exceptions.InvalidStructuredJSON("...")
I believe it does this because line 48 we check whether headers is binary and if not we assume this is a structured request and try to read as json.
Perhaps instead of raising InvalidStructuredJSON we should set specversion to None and outside the if statement raise MissingRequiredFields('can't find specversion and couldn't decode json').
The text was updated successfully, but these errors were encountered: