How to handle NoActiveTargets erro in apigee

Sometimes my backend doesn’t respond and i get this error. Is the any way to handle this error and can my custom raise fault when backend doesn’t respond

Sure, with FaultRules you should be able to do that. The documentation is here.

Have you attached a DefaultFaultRule to the TargetEndpoint?