【发布时间】:2014-09-09 16:19:13
【问题描述】:
我的 API 有一个 DSS 服务作为后端,并具有用于 GET、POST、PUT 和 DELETE 操作的相关资源。但是,当我对服务发出 DELETE 操作时,即使在后端成功发生,APIM 也会返回运行时错误:
curl -v -H "Authorization: Bearer 356bcb27f82c849e383d3765e0ccce" -X DELETE http://localhost:8280/fte/1.0/users/105/vacations/13
* Hostname was NOT found in DNS cache
* Trying localhost...
* Connected localhost (localhost) port 8280 (#0)
> DELETE /fte/1.0/users/105/vacations/13 HTTP/1.1
> User-Agent: curl/7.36.0
> Host: localhost:8280
> Accept: */*
> Authorization: Bearer 356bcb27f82c849e383d3765e0ccce
>
< HTTP/1.1 202 Accepted
< Access-Control-Allow-Headers: authorization,Access-Control-Allow-Origin,Content-Type
< Content-Type: application/xml; charset=UTF-8
< Date: Tue, 09 Sep 2014 07:38:00 GMT
* Server WSO2-PassThrough-HTTP is not blacklisted
< Server: WSO2-PassThrough-HTTP
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
<am:fault xmlns:am="http://wso2.org/apimanager"><am:code>0</am:code><am:type>Status report</am:type><am:message>Runtime Error</am:message><am:description>Error while building message</am:description></am:fault>[
如何防止此类错误?我是否需要来自后端服务的输出消息,以便它不显示此运行时错误?
谢谢
【问题讨论】:
标签: curl wso2 wso2esb wso2dss wso2-am