Skip to content

chore: add proper toString() implementations for NetworkResponse types#20

Merged
btrautmann merged 1 commit into
mainfrom
bt/chore/to-string
Dec 23, 2025
Merged

chore: add proper toString() implementations for NetworkResponse types#20
btrautmann merged 1 commit into
mainfrom
bt/chore/to-string

Conversation

@btrautmann

Copy link
Copy Markdown
Contributor

📰 Summary of changes

What is the new functionality added in this PR?

This PR adds toString() support to NetworkResponse types to support better debugging when errors occur at runtime. Without this, logs (e.g. Datadog) show Instance of UnprocessableEntity for example, which is not helpful.

I decided to implement these manually, rather than rely on something like Equatable, to avoid any required configuration on the part of a consumer (e.g. Equatables global stringify config).

🧪 Testing done

What testing was added to cover the functionality added in this PR

Added unit tests to protect against regressions.

@btrautmann btrautmann requested review from a team as code owners December 23, 2025 15:46

@joshdep joshdep left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domain lgtm

@btrautmann

Copy link
Copy Markdown
Contributor Author

/no-platform

@btrautmann btrautmann merged commit 8389d3f into main Dec 23, 2025
5 checks passed
@btrautmann btrautmann deleted the bt/chore/to-string branch December 23, 2025 15:59
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