我已經在騾社區版3.8應用程序定義的流程如下:騾子APIkit:「流未找到」,而不是HTTP 415不支持的媒體類型
<flow name="post:/api/v1:application/json:api-v1-config">
<set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
<expression-component>
payload = app.registry['RestServiceBean_2.10'].postApiCall(
payload,
message);
</expression-component>
</flow>
而且在同一個文件映射爲一個HTTP 415
<apikit:mapping statusCode="415">
<apikit:exception value="org.mule.module.apikit.exception.UnsupportedMediaTypeException" />
<set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
<set-payload value="{ "message": "Unsupported media type" }" doc:name="Unsupported media type"/>
</apikit:mapping>
現在,當我將請求發送到該端點與Content-Type: application/xml
,我在日誌中看到一個異常稱爲Flow not found for resource ...
和接收HTTP 500響應。
我錯過了什麼,在這種情況下,我必須告訴配置它應該返回HTTP 415的位置?