Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding::UndefinedConversionError with STRIPE_LOG_LEVEL=debug #1059

Closed
EugeneGrigorenko opened this issue May 16, 2022 · 1 comment · Fixed by #1076
Closed

Encoding::UndefinedConversionError with STRIPE_LOG_LEVEL=debug #1059

EugeneGrigorenko opened this issue May 16, 2022 · 1 comment · Fixed by #1076
Assignees
Labels

Comments

@EugeneGrigorenko
Copy link

EugeneGrigorenko commented May 16, 2022

Describe the bug

When retrieving invoices with log-level debug I'm getting UndefinedConversionError for any invoice except those created manually using UI.

This does not happen when I change STRIPE_LOG_LEVEL to info.

To Reproduce

  1. Set Stripe.log_level to debug
  2. Try fetching an invoice.

Expected behavior

Should not error out and return the invoice

Code snippets

irb(main):090:0> invoice = Stripe::Invoice.retrieve( '<id>')
INFO Request to Stripe API method=get num_retries=0 path=/v1/invoices/<id>
DEBU Request details query= process_id=33848 thread_object_id=67660 log_timestamp=1047648.317347
DEBU ConnectionManager starting request method_name=GET path="/v1/invoices/<id>?" process_id=33848 thread_object_id=67660 connection_manager_object_id=110300 connection_object_id=110320 log_timestamp=1047648.317607
DEBU ConnectionManager request complete method_name=GET path="/v1/invoices/<id>?" process_id=33848 thread_object_id=67660 connection_manager_object_id=110300 connection_object_id=110320 response_object_id=942060 log_timestamp=1047648.582633
INFO Response from Stripe API api_version=2020-08-27 elapsed=0.2655479999957606 method=get path=/v1/invoices/<id> request_id=req_ZBmj0CEgCXyk0t status=200
ERRO Request error elapsed=0.26612899999599904 error_message="\"\xC3\" from ASCII-8BIT to UTF-8" method=get path=/v1/invoices/in_1L08IbDSlLoj86tb07LHpLaA
/Users/eugenegrigorenko/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/stripe-6.0.0/lib/stripe/util.rb:369:in `write': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
irb(main):091:0>


### OS

macOS

### Language version

3.1.0

### Library version

stripe (6.0.0)

### API version

2020-08-27

### Additional context

_No response_
@dcr-stripe
Copy link
Contributor

Thanks for the report @EugeneGrigorenko and sorry you're having issues.

The team will investigate this and hopefully have a fix out shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants