this fixes an issue with nexposeapi errors
on newer versions of the nexpose api the error XML schema has been changed, this prevents the exception from being generated correctly MS-289bug/bundler_fix
parent
fd7b14ed48
commit
ac0984e8dd
|
@ -182,6 +182,25 @@ class APIRequest
|
|||
end
|
||||
end
|
||||
|
||||
@res.elements.each('//Failure') do |s|
|
||||
|
||||
# 1.1 returns lower case elements
|
||||
s.elements.each('message') do |m|
|
||||
@error = m.text
|
||||
end
|
||||
s.elements.each('stacktrace') do |m|
|
||||
@trace = m.text
|
||||
end
|
||||
|
||||
# 1.2 returns capitalized elements
|
||||
s.elements.each('Message') do |m|
|
||||
@error = m.text
|
||||
end
|
||||
s.elements.each('Stacktrace') do |m|
|
||||
@trace = m.text
|
||||
end
|
||||
end
|
||||
|
||||
# This is a hack to handle corner cases where a heavily loaded Nexpose instance
|
||||
# drops our HTTP connection before processing. We try 5 times to establish a
|
||||
# connection in these situations. The actual exception occurs in the Ruby
|
||||
|
|
Loading…
Reference in New Issue