问题
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