Skip to content

Commit

Permalink
Add more info to exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
balvig committed Oct 2, 2024
1 parent 3c380e9 commit d44c283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mfynab/money_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def download_csv_string(date:, session_id:)
)

result = http.request(request)
raise unless result.is_a?(Net::HTTPSuccess)
raise unless result.body.valid_encoding?
raise "Got unexpected result: #{result.inspect}" unless result.is_a?(Net::HTTPSuccess)
raise "Invalid encoding" unless result.body.valid_encoding?

result.body.encode(Encoding::UTF_8)
end
Expand Down

0 comments on commit d44c283

Please sign in to comment.