-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetUpstream fail with error "bad argument #2 to 'encode' (table expected, got boolean)" #114
Comments
The issue seems to be caused by the incorrect typing of the return value. The return value is marked to return Empty, while it can return a flag and a possible error. Internally tracked: KAG-3814 |
Fix the return type for the `.Service.SetUpstream` external plugin PDK method. Fixes issue #114. Sister PR:
Fix the return type for the `.Service.SetUpstream` external plugin PDK method. Fixes issue #114. Sister PR: Kong/kong#12727
Thank you for the report; I have opened the following PRs fixing the issue:
I will keep this issue open until those are merged and I release a new version of the Go PDK. |
Fix the return type for the `.Service.SetUpstream` external plugin PDK method. Fixes issue Kong/go-pdk#114. Sister PR: Kong/go-pdk#191
Fix the return type for the `.Service.SetUpstream` external plugin PDK method. Fixes issue Kong/go-pdk#114. Sister PR: Kong/go-pdk#191
Fix the return type for the `.Service.SetUpstream` external plugin PDK method. Fixes issue #114. Sister PR: Kong/kong#12727
Fix the return type for the `.Service.SetUpstream` external plugin PDK method. Fixes issue #114. Sister PR: Kong/kong#12727
Fix the return type for the `.Service.SetUpstream` external plugin PDK method. Fixes issue #114. Sister PR: Kong/kong#12727
The fix has been merged - and is part of the |
kong 2.8.1.1
go-pdk v0.8.0
I made a go plugin which use the SetUpstream method to select an existing upstream.
The SetUpstream method is called during the access phase.
The plugin is activated for a specific route.
The upstream has only one target (xxx.xxx.xxx.xxx:8080)
The api on that target run fine.
I get the following error:
Is this a bug ?
The same plugin in python works fine.
I stripped down my plugin to only this SetUpstream function call, and it still gives me this error.
The text was updated successfully, but these errors were encountered: