Path variable = "476%3B"
In a delete API, in path variable value, the character ';' is included in Id and is encoded as '%3B' The id is passed as a string and later on in the app, it is parsed as an integer using Integer.parseInt("476%3B") When this Id value goes thru the API gateway, somehow, the character ';' is getting stripped and using "476" instead of "476%3B" for Id. On execution of the app, I am expecting http code 400 (bad request) But I am getting 404 (not found) The Id can only be integer. Can someone explain the reason behind this?
;will result as 404 NOT FOUND. 1 - URL endpoint with path variable = localhost:8080/user/123 2 - URL with request param = localhost:8080/user?123 Notice that in case 1, base URL will change if you append anything to the integer value (semi colon in your case) but in case 2, base url stays same and only the param value is changing