Question 340
A REST operation returns a 422 validation error after the user submits malformed data. What should the agent solution use in this situation?
Explanation
Correct Answer
Return field-specific correction guidance without treating the write as complete. Validation failure indicates no successful business update should be claimed.
Incorrect Answers
Acceptance of asynchronous work is not proof that the export finished. It serves “202 Accepted response for a long-running export job”, not “the user submits malformed data”.
The backend, not model reasoning, must enforce the caller's permissions. The present requirement is “the user submits malformed data”; “regulated backend where requests require signed authorization tokens” is a distinct situation.
Unsafe parameter construction can change the request target or semantics. That matters for “a user-supplied product code containing URL control characters” rather than the condition “the user submits malformed data”.