Description
Not sure if this is the right place to ask this question, but I can’t seem to find much help on the subject. We’ve been using the container now for months and everything works great. We’ve used this for a simple API which only contains a single Query Parameter. We’ve noticed that when we put a space into the parameter then the API Gateway returns an Internal Server Error immediately. So for example
/search?identifier=XXXXX (works fine)
/search?identifier=XXX XXX (internal server error)
If I run the API from the AWS Console test facility and replace the space with %20 then it works. So XXX%20XXX, but if I test the API from Postman, then with the space or the %20 I get the internal server error.
From looking at the logs, it appears that the request is being sent to the Lambda. At first we assumed it was the gateway returning the error straight away, but it looks like it might be the way the Lambda is handling the space in the param.
Hope someone can help because we’re stumped. From reading some stuff online, for a non Proxy API the suggestion is to use a message template on the parameters and use the $util.urlEncode(), but I can’t see how to apply this with a proxy.
Is there something we have to put into the Java code to take care of this?