Skip to content

[Bug]: When response deserialization fails, Content is null in ApiException #2098

@LichP

Description

@LichP

Describe the bug 🐞

This is a re-opening of #1384, which had been fixed by GH-1705, however that PR was reverted due to #1729 . Clearly a better solution is needed to ensure ApiException.Content is populated when a deserialization fails while ensuring that the fix itself doesn't break any kind of deserialization!

Step to reproduce

As per #1384

Reproduction repository

No response

Expected behavior

When deserialization fails, Content property should be populated with response content.

Screenshots 🖼️

No response

IDE

No response

Operating system

No response

Version

No response

Device

No response

Refit Version

No response

Additional information ℹ️

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions