17.15Failure question
Interviewer asks:
“What happens if Loyalty is down?”
Don't immediately answer.
Ask:
“Is Loyalty mandatory for the customer profile?”
If no:
Salesforce success
Billing success
Loyalty fails
maybe return:
{
"customerId": "C001",
"name": "Acme",
"balance": 1200,
"loyalty": null,
"warnings": [
"Loyalty information temporarily unavailable"
]
}
If mandatory:
propagate failure