Current documentation
Currently, the document does not mention how http status will be returned. Obviously, for functions using http.ResponseWriter, we can control by res.WriteHeader(200):
func Handle(ctx context.Context, res http.ResponseWriter, req *http.Request) {
However, for cloudevent users, there's no option for controlling http status directly, instead it should be controlled by err error.
Current documentation Currently, the document does not mention how http status will be returned. Obviously, for functions using
http.ResponseWriter
, we can control byres.WriteHeader(200)
:However, for cloudevent users, there's no option for controlling http status directly, instead it should be controlled by
err error
.Accroding to my understanding, the function should return 5xx if an error is returned by
Handle
. However, I tested the case but still returned 200.Suggested changes or additions