-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
KONG not handles null value in the attributes of JSON payload. #10658
Comments
can you show your proto file? |
syntax = "proto3"; package stepeventparserservice.model.v1; option java_multiple_files = true; message ProductParserServiceProcessRequest { message ProductPayload { message Products { message Product { message Values { message Suppliers {
} message Assets { message ReferencedProducts { message MasterProductFamily { message WebHierarchies { message PrimaryProductHierarchy { message DeleteProduct { |
Perhaps you should pass the |
Let me give you another example. Proto:
Payload which faces 500 error from KONG
Error Payload which is successfully accepted
|
because I think your question is why Kong did not escape |
So sending |
I think you can test by not passing the
I don't know. |
No matter what the client sends, Kong should not return |
Do we need to fix it?Is so, I'd like to try. |
@sabertobihwy I would prefer to see a fix from KONG, because we use external system to get the input payload, which we cannot customize it easily to avoid sending |
Is there an existing issue for this?
Kong version (
$ kong version
)Kong 2.8
Current Behavior
When I hit a Http Request with a payload that includes
{ "attribute" : null }
then Kong throws below error.
2023/03/17 05:34:36 [error] 1114#0: *226732 [kong] init.lua:297 [grpc-gateway] /usr/local/share/lua/5.1/kong/plugins/grpc-gateway/deco.lua:247: bad argument #2 to 'encode' (string expected for field 'object_type', got userdata), client: 172.19.0.1, server: kong, request: "PUT /api/v1/products HTTP/1.1", host: "localhost:8082"
Expected Behavior
When I hit a Http Request with a payload that includes
{ "attribute" : null }
It should not throw any error as it is valid JSON.
Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: