Skip to content

fix: decode error on refund response - #309

Closed
potibm wants to merge 1 commit into
sumup:mainfrom
potibm:fix-refund
Closed

fix: decode error on refund response#309
potibm wants to merge 1 commit into
sumup:mainfrom
potibm:fix-refund

Conversation

@potibm

@potibm potibm commented Aug 12, 2026

Copy link
Copy Markdown

This PR fixes an unmarshaling error that happens when the Refund endpoint returns an empty {} body.

I just changed the code to decode into a standard json.RawMessage first. Now it works perfectly on my end.

As mentioned in the issue #308 , there are a few other types in checkouts.go and customers.go that might need a similar adjustment, but I only touched the Refund endpoint for now to get it working again.

@matoous

matoous commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Hi @potibm, thanks for the PR! I will close it in favor of: #310. The fix is correct, but we need to apply it in the codegen otherwise this would get overwritten the next time we generate the SDK from the OpenAPI specs.

@matoous matoous closed this Aug 12, 2026
@potibm

potibm commented Aug 12, 2026

Copy link
Copy Markdown
Author

Hi @matoous. Thanks for taking care! Should have taken a closer look at CONTRIBUTING.md :)

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

Successfully merging this pull request may close these issues.

2 participants