advantage_quickbase 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/quickbase.rb +10 -1
  2. metadata +1 -1
data/lib/quickbase.rb CHANGED
@@ -252,7 +252,16 @@ module AdvantageQuickbase
252
252
 
253
253
  result = @http.post( url, request_xml, headers )
254
254
 
255
- parse_xml( result.body )
255
+ xml_result = parse_xml( result.body )
256
+
257
+ error_code = get_tag_value( xml_result, :errcode )
258
+ if error_code.to_i != 0
259
+ error_name = get_tag_value( xml_result, :errtext )
260
+ error_details = get_tag_value( xml_result, :errdetail )
261
+ raise "\nAPI ERROR ##{error_code}: #{error_name}\n#{error_details}"
262
+ end
263
+
264
+ xml_result
256
265
  end
257
266
  end
258
267
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advantage_quickbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: