AZ-204 · Question #233
Drag and Drop Question You are developing a REST web service. Customers will access the service by using an Azure API Management instance. The web service does not correctly handle conflicts…
The correct answer is on-error; context; set-status. The correct policy structure uses 'on-error' as the error-handling section that intercepts backend errors, 'context' to access the response details and check if the body contains the word 'conflict', and 'set-status' to override the HTTP status code from 500 to the correct 409…
Question
Exhibit
Answer Area
Drag items
Correct arrangement
- on-error
- context
- set-status
Explanation
The correct policy structure uses 'on-error' as the error-handling section that intercepts backend errors, 'context' to access the response details and check if the body contains the word 'conflict', and 'set-status' to override the HTTP status code from 500 to the correct 409 Conflict response. The 'on-error' policy section in Azure API Management is specifically designed to catch and handle errors returned from the backend service, allowing you to transform incorrect responses before they reach the client.
Topics
Community Discussion
No community discussion yet for this question.
