When do we use RaiseFault policy and AssignMessage policy in fault handling?

Please explain to me when we use assign message policy and raise fault policy in fault handling..

Do we use them interchangeably?

Thanks in advance

1 1 446
1 REPLY 1

sidd-harth
Participant V

Use Assign Message policy for sending custom error messages in Fault rules.

The Raise Fault policy is a way of putting an API proxy in an error state when an error wouldn't have otherwise occurred.

In the case of FaultRule, the proxy is already in error state due to some error. So using Raisefault here doesnt make sense IMO.

But you can use Raise Fault and FaultRules can also work together. More info,

https://docs.apigee.com/api-platform/fundamentals/fault-handling#rulesvraisefault