-
Notifications
You must be signed in to change notification settings - Fork 157
Clarification on error handling #152
Comments
hi @dippynark, that's a good question. actually it does fail open. As of now, Go SDK doesn't support host calls to close streams in case of failure (named |
Awesome, thanks! I guess will leave this open until then? Happy to close it though as it answers the question |
yeah let's leave this open until then. Thanks! |
Hi, I did not find any api in the spec that would support closing the connection for HTTP context.
This is exactly what I need to know. Could we use |
Looking at the rust examples https://github.com/proxy-wasm/proxy-wasm-rust-sdk/blob/master/examples/http_auth_random.rs and https://github.com/proxy-wasm/proxy-wasm-rust-sdk/blob/master/examples/http_headers.rs it seems they just leave the processing paused or never resume it in the case there could be an error. |
The example auth module dispatches a HTTP request to determine whether to allow the request: https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/main/examples/http_auth_random/main.go#L61-L65
This logs a critical error and returns a continue action. Does this mean that if the auth service is down all requests will be allowed through? i.e. does this code fail open?
If so, how would you fail closed? You could use something like
proxywasm.SendHttpResponse(403...
but then how do you handle any error returned by that function?The text was updated successfully, but these errors were encountered: