How do I add raise_fault_policy in apiman 3.1.1 #2508
Answered
by
msavy
zumikavvayi
asked this question in
Help
-
I've designed a custom event policy that checks certain conditions and publish events. However, if there is an exception during the event, I want the request to fail so that the client can be alerted. I noticed some old documentation mentioning a "raise_fault_policy" that might help with this issue. How can I accomplish this in apiman 3.1.1? |
Beta Was this translation helpful? Give feedback.
Answered by
msavy
Apr 18, 2023
Replies: 1 comment 2 replies
-
Example: IPolicyFailureFactoryComponent failureFactory = context.getComponent(IPolicyFailureFactoryComponent.class);
PolicyFailure failure = failureFactory.createFailure(...);
chain.doFailure(failure); |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
msavy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chain.doFailure
Example: