Open eguzki opened 2 weeks ago
That's sort of an expected behavior tho... what would you rather see? We (currently) have no way of reporting this back up to the user (or policy author).
Also, I don't think this should use the failureMode
setting, as this isn't failure but a user error.
well, certainly, it should not panic and block the request. Maybe return 500 Internal Server Error. Maybe, if it's in a predicate, evaluate to false
. Maybe, if it's in a expression to generate a descriptor entry, just do not add the descriptor entry.
Too many Maybe's, I known.
Wasm module can only evaluate at request time. But it is not downstream client's fault if the expression is incorrect. It is policy owner's fault.
My take? 500 Internal Server Error.
When expression is something like:
The wasm panics. Envoy's logs show
And the curl triggering the request hangs and never returns.