Skip to content

Exception is raised in parse_response if status code is 3xx #155

@andriuszazeckas

Description

@andriuszazeckas

Environment

  • Checkout SDK version: 1.2.3

Description

https://github.com/checkout/checkout-sdk-ruby/blob/master/lib/checkout_sdk/api_client.rb
Line 112 raises exception on 302 response which is a succesfull response - https://api-reference.checkout.com/#operation/getReportFile

Expected behavior

It is expected to raise exception on 4xx status

Possible solution

Change line 112 to:
raise CheckoutApiException, response if response.status < 200 || response.status >= 400

  • I may be able to implement this bug fix

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions