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

Unable to deserialize response with Content-Type application/JSON #5

Open
swerling opened this issue Apr 19, 2021 · 3 comments
Open

Comments

@swerling
Copy link

General information

  • SDK/Library version: payouts-ruby-sdk v1.0.0
  • Ruby Version: 2.7.2

Issue description

As of yesterday, 2021-04-18, a little bit after 2021-04-18T18:31:55.528+00:00, you're backend started returning some responses with content type application/JSON (with all caps 'json').

This gem cannot handle the response, see:
https://github.com/paypal/paypalhttp_ruby/blob/master/lib/paypalhttp/serializers/json.rb#L14

If I change

    def content_type
      /application\/json/
    end

..to a case insensitive regex, then payout submission works again:

    def content_type
      /application\/json/i
    end

This is a very serious bug, since it breaks in a way that prevents the calling code from getting the payout_batch_id, which is needed by clients to later check on the status of a payout.

@edmundonm
Copy link

Our teams are also encountering this very serious issue preventing us from processing successful Payout responses using the Ruby Payouts SDK Gem.

The full error message agrees with the issue and proposed solution above:

PayPalHttp::UnsupportedEncodingError: Unable to deserialize response with Content-Type application/JSON. Supported decodings are ["/application\\/json/", "/text\\/.*/", "/multipart\\/.*/", "/^application\\/x-www-form-urlencoded/"]

@pathouse
Copy link

Looks like paypal fixed their responses so this is no longer needed

@nima855
Copy link

nima855 commented May 3, 2021

@pathouse this occurred again on April 30th from 4:30am to 9:30am (Pacific Time). It has stopped since then

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

No branches or pull requests

4 participants