我已经在骡社区版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的位置?