Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to Handle all exceptions in single javascript policy.

Hi,
Iam doing exception handling in APIGEE, I implemented below JS to handle few errors. Also I want to remove the prefix for "ErrorDescription" field from the dynamic error responses.

Please let me know, if anyone have any standard or suggested approach to handle all exceptions in single JS policy.
Thanks in Advance.

RakeshSudhagoni_0-1731653630923.pngRakeshSudhagoni_1-1731653650175.png

 

Solved Solved
0 4 236
2 ACCEPTED SOLUTIONS

@RakeshSudhagoni - I've added more to the sample now. Please take a look. Also I dont think its a good idea to reveal the Regex to the end user. A hacker could try something else outside of this Regex if needed. Apigee returns this for info which needs to be converted into a custom message while sending to the client. 

View solution in original post

4 REPLIES 4