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.
- data/lib/quickbase.rb +10 -1
- 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
|