Hi,
I am using Api Gateway’s request transformation, the transformation rules are applied based on a specific request.path pattern. Identification of the path /SOMETEXT/case/SOMETEXT is done using regex ^/[a-zA-Z0-9-.~_ ]+/case/[a-zA-Z0-9-.~_ ]+$. When a request is made matching the above pattern an exception is thrown as shown below, the regular expression itself is valid - its been tested at regex101.com.
{"Exception":"API Gateway encountered an error. Error Message: Exception occured while executing transformation policy. Exception:
Unclosed character class near index 19
^\/[a-zA-Z0-9-.~_ \. Request Details: Service - ecase, Operation - /{domainName}/case/{id}, Invocation Time:10:49:01, Date:19.3.2020, Client IP - 10.142.4.1, User - Default and Application:sys:defaultApplication"}
From the error message it appears that there is problem with closing ‘]’ bracket, but i am unable to determine a proper fix for this. Looking forward for a solution.
Thanks,
Manjunath