Skip to content

Commit

Permalink
Resolve issue when no root_response was given
Browse files Browse the repository at this point in the history
  • Loading branch information
chapmankyle committed Sep 26, 2024
1 parent 9b646ba commit 3b58686
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/ups/parsers/base_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ def success?
end

def status_code
root_response[:Response][:ResponseStatus][:Code]
if root_response
root_response[:Response][:ResponseStatus][:Code]
else
'-1'
end
end

def status_description
root_response[:Response][:ResponseStatus][:Description]
if root_response
root_response[:Response][:ResponseStatus][:Description]
else
''
end
end

def error_description
Expand Down

0 comments on commit 3b58686

Please sign in to comment.