need return error in some cases in sdkserver

Bug #1785543 reported by jichenjc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zVM Cloud Connector
Confirmed
Low
dyyang@cn.ibm.com

Bug Description

we have following cases only construct the error but not report the error to client side

129 # API_data should be in the form [funcname, args_list, kwargs_dict]
130 if not isinstance(api_data, list) or len(api_data) != 3:
131 msg = ("(%s:%s) SDK server got wrong input: '%s' from client."
132 % (addr[0], addr[1], data))
133 results = self.construct_internal_error(msg)
134 return

140 str(api_kwargs)))
141 try:
142 api_func = getattr(self.sdkapi, func_name)
143 except AttributeError:
144 msg = ("(%s:%s) SDK server got wrong API name: %s from"
145 "client." % (addr[0], addr[1], func_name))
146 results = self.construct_api_name_error(msg)
147 return
148

67 def construct_internal_error(self, msg):
 68 self.log_error(msg)
 69 error = returncode.errors['internal']
 70 results = error[0]
 71 results['modID'] = returncode.ModRCs['sdkserver']
 72 results.update({'rs': 1,
 73 'errmsg': error[1][1] % {'msg': msg},
 74 'output': ''})
 75 return results

Changed in python-zvm-sdk:
status: New → Confirmed
assignee: nobody → dyyang@cn.ibm.com (dyyang)
jichenjc (jichenjc)
Changed in python-zvm-sdk:
milestone: none → future
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.