0

是否有 WSO2 数据服务错误代码的链接或参考?

我收到错误代码“401000”,500000,我需要知道该错误代码的确切含​​义,我正在向后端发送错误代码,但我还需要在 WSO2ESB 中发送确切的消息,我们有参数调用 get-property('ERROR_MESSAGE ') .WSO2DSS 中是否有任何属性可以显示确切的错误消息

ERROR_CODE = 500000, ERROR_MESSAGE = null,

并将此消息直接发送到后端

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

实际上dss错误如下

 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.
4

1 回答 1

0

您所指的错误代码实际上是由 ESB 定义的错误代码,而不是来自 DSS。在 DSS 中,我们不提供这样的代码,而只是在故障消息中给出一个“DS 代码”,这里显示为“DATABASE_ERROR”。ESB 错误代码及其含义可在此处找到 [1]。

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

干杯,安佳娜。

于 2013-03-27T17:20:50.090 回答