드래그 앤 드롭 질문
REST 웹 서비스를 개발하고 있습니다. 고객은 Azure API Management 인스턴스를 사용하여 해당 서비스에 액세스하게 됩니다.
웹 서비스가 충돌을 제대로 처리하지 못합니다. HTTP 상태 코드를 반환하는 대신 다른 오류를 발생시킵니다.
409 오류 발생 시 서비스는 상태 코드 500을 반환합니다. 상태 메시지 본문에는 "conflict"라는 단어만 포함되어 있습니다.
갈등 상황에서 올바른 대응책이 도출되도록 해야 합니다.
정책을 어떻게 완성해야 할까요? 정답을 보려면 해당 코드 조각을 올바른 위치로 드래그하세요. 각 코드 조각은 한 번, 여러 번 또는 전혀 사용되지 않을 수 있습니다. 내용을 보려면 창 사이의 분할 막대를 드래그하거나 스크롤해야 할 수도 있습니다.
참고: 정답 하나당 1점입니다.

Reveal Solution
Discussion
Correct Answer:

Explanation:
Box 1: on-error
Policies in Azure API Management are divided into inbound, backend, outbound, and on-error.
If there is no on-error section, callers will receive 400 or 500 HTTP response messages if an error condition occurs.
Box 2: context
Box 3: context
Box 4: set-status
The return-response policy aborts pipeline execution and returns either a default or custom response to the caller. Default response is 200 OK with no body.
Custom response can be specified via a context variable or policy statements.
Syntax:
<return-response response-variable-name="existing context variable">
<set-header/>
<set-body/>
<set-status/>
</return-response>
Box 5: on-error
Reference:
https://docs.microsoft.com/en-us/azure/api-management/api-management-error-handling-policies
https://docs.microsoft.com/en-us/azure/api-management/api-management-transformation-policies