Added exception throwing to curl client call