How to know ERROR message in wso2DSS

馋奶兔 提交于 2019-12-25 03:33:20

问题


Is there any link or reference to WSO2 Data Service error codes ?

I am getting error code '401000',500000, I need to know what exactly mean by that error code using this i am sending errorcode to backend but i need to send exact message also in WSO2ESB we have paroperty call get-property('ERROR_MESSAGE') .is there any property we have in WSO2DSS which will show me exact error message

ERROR_CODE = 500000, ERROR_MESSAGE = null,

and sending this message to backend directly

{"insert_dept_operation":{"deptno":"","deptname":"hr","deptid":"7"}}

actually dss error is below

 ERROR {org.apache.axis2.transport.http.CommonsHTTPTransportSender} -  DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: emp_DataService
Location: /emp_DataService.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: insert_emp_operation
Current Params: {eno=9, esal=45, ename=kk}
Nested Exception:-
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "emp_pkey"
  Detail: Key (eno)=(9) already exists.

org.apache.axis2.AxisFault: DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: emp_DataService
Location: /emp_DataService.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: insert_emp_operation
Current Params: {eno=9, esal=45, ename=kk}
Nested Exception:-
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "emp_pkey"
  Detail: Key (eno)=(9) already exists.

回答1:


The error codes you're referring is actually the error codes defined by the ESB, not from DSS. In DSS, we do not provide codes such as that, but only give a "DS Code" in the fault message, which here it says "DATABASE_ERROR". The ESB error codes and their meanings can be found here [1].

[1] http://docs.wso2.org/wiki/display/ESB460/Error+Handling+and+Error+Codes

Cheers, Anjana.



来源:https://stackoverflow.com/questions/15402606/how-to-know-error-message-in-wso2dss

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!