ontrac-web-services 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ontrac/version.rb +1 -1
- data/lib/ontrac/web_services/service.rb +7 -3
- metadata +1 -1
data/lib/ontrac/version.rb
CHANGED
@@ -106,9 +106,13 @@ module Ontrac::WebServices
|
|
106
106
|
package_messages = response_xml.xpath("//PackageData/Message")
|
107
107
|
|
108
108
|
if (status.empty? || status != "1" || response_xml.xpath("//PackageData/Status != 1"))
|
109
|
-
|
110
|
-
|
111
|
-
|
109
|
+
if (status.empty? && message.empty?)
|
110
|
+
msg = "OnTrac's label system returned an invalid response"
|
111
|
+
else
|
112
|
+
msg = "No status information was returned for the request" if (status.empty?)
|
113
|
+
msg = message || "The request returned a status of #{status}" if (status != "1")
|
114
|
+
msg << " -- " + [ *package_messages.to_a ] * " ; " if (!package_messages.empty?)
|
115
|
+
end
|
112
116
|
|
113
117
|
raise msg
|
114
118
|
end
|