xen-org/xen-api — pull request #530 by rabink (2012-04-03 20:26:58+00:00)
Title: CA-54153: Parse the WLB response ResultCode before trying to parse rest of the response content

Currently xapi ignores error codes sent by wlb until it runs into some problems. Then it thinks "maybe call to wlb didn't succeed in the first place," gets the error code/message and raises exception.
This change will fix that process, i.e. xapi will parse error code and continue only if error code is 0 (i.e. call succeeded).

Signed-off-by: Rabin Karki