← Back to team overview

openerp-india team mailing list archive

[Bug 1023429] Re: xmlrpc errors not following standard

 

For some reason this was marked a question or invalid.

Again, to restart. The XMLRPC spec
(http://xmlrpc.scripting.com/spec.html) defines a fault code as:

"The <methodResponse> could also contain a <fault> which contains a
<value> which is a <struct> containing two elements, one named
<faultCode>, an <int> and one named <faultString>, a <string>. A
<methodResponse> can not contain both a <fault> and a <params>."

OpenERP does not adhere to this by returning things like:

<methodResponse> 
	<fault> 
		<value>
			<struct> 
				<member> 
					<name>faultCode</name> 
					<value>
						<string>'res.users' object has no attribute 'READ'</string>
					</value> 
				</member> 
				<member> 
					<name>faultString</name> 
					<value>
						<string>Traceback (most recent call last):
							File "/usr/lib/pymodules/python2.7/openerp/wsgi/core.py", line 79, in xmlrpc_return result = openerp.netsvc.dispatch_rpc(service, method, params)
							File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params)
							File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 572, in dispatch res = fn(db, uid, *params)
							File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 121, in wrapper return f(self, dbname, *args, **kwargs)
							File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 176, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw)
							File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 164, in execute_cr return getattr(object, method)(cr, uid, *args, **kw)
							AttributeError: 'res.users' object has no attribute 'READ' </string>
					</value> 
				</member> 
			</struct>
		</value> 
	</fault> 
</methodResponse>

** Changed in: openobject-server
       Status: Invalid => New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1023429

Title:
  xmlrpc errors not following standard

Status in OpenERP Server:
  New

Bug description:
  
  When creating a partner with no fields, the xmlrpc response is below. not that the fault code should be a number as per spec. the fault string is empty.

  <methodResponse> 
  	<fault> 
  		<value>
  			<struct> 
  				<member> 
  					<name>faultCode</name> 
  					<value>
  						<string>warning -- Integrity Error
  							The operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it
  							- creation/update: a mandatory field is not correctly set [object with reference: name - name]</string>
  					</value> 
  				</member> 
  				<member> 
  					<name>faultString</name> 
  					<value>
  						<string />
  					</value> 
  				</member> 
  			</struct>
  		</value> 
  	</fault> 
  </methodResponse>

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1023429/+subscriptions


References