Question 40 — AB-620 Case Study Set
Review Paideffort's proposed post-request logic after enabling Continue on error.
def handle_tracking_result(status_code, response, error_body):
if status_code == 200:
return {
"message": f"{response.status} - expected {response.estimatedDelivery}"
}
return {
"message": error_body
}
What should be improved to satisfy Paideffort's customer-facing error requirement? (Select one answer)
Replace the returned raw error body with a predefined customer-safe recovery message while retaining the error value for internal diagnostics.
Return both the raw error body and HTTP status code so customers can provide complete diagnostic information to support.
Remove the status-code check and always display
response.statusbecause the response schema exists even when the request fails.Send the error body to the Foundry agent and display its complete interpretation to the customer without additional filtering.
Correct answers
Replace the returned raw error body with a predefined customer-safe recovery message while retaining the error value for internal diagnostics.
Explanations
Correct Answer:
Replace the returned raw error body with a predefined customer-safe recovery message while retaining the error value for internal diagnostics.
Explanation:
Paideffort wants failed tracking attempts to remain conversationally useful without exposing carrier implementation details. The status code and error body can be retained for logging and diagnostics, while the customer receives a controlled message such as an invitation to retry later or contact support.
Wrong Answers:
Return both the raw error body and HTTP status code so customers can provide complete diagnostic information to support.
This exposes backend details that Paideffort specifically wants to keep out of customer conversations.
Remove the status-code check and always display response.status because the response schema exists even when the request fails.
A response schema defines the expected shape of successful data but doesn't guarantee that those fields exist after every failed request. Paideffort still needs explicit failure branching.
Send the error body to the Foundry agent and display its complete interpretation to the customer without additional filtering.
This adds unnecessary model processing and can still expose sensitive or unsuitable backend information. Paideffort can handle the known error state deterministically.