ontrac-web-services 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module Ontrac
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
@@ -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
- msg = "No status information was returned for the request" if (status.empty?)
110
- msg = message || "The request returned a status of #{status}" if (status != "1")
111
- msg << " -- " + [ *package_messages.to_a ] * " ; " if (!package_messages.empty?)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ontrac-web-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: