diff options
-rwxr-xr-x | gsxws.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -416,8 +416,12 @@ class Order(GsxObject): dt = CLIENT.factory.create('ns1:createStockingOrderRequestType') dt.userSession = SESSION dt.orderData = self.data - result = CLIENT.service.CreateStockingOrder(dt) - return result.orderConfirmation + + try: + result = CLIENT.service.CreateStockingOrder(dt) + return result.orderConfirmation + except suds.WebFault, e: + raise GsxError(fault=e) class Returns(GsxObject): def __init__(self, order_number=None, *args, **kwargs): |