Skip to content

Make public top-level TypedStreamDecoderError type - #16

Merged
mattt merged 2 commits into
mainfrom
mattt/refactor-error
Mar 24, 2026
Merged

Make public top-level TypedStreamDecoderError type#16
mattt merged 2 commits into
mainfrom
mattt/refactor-error

Conversation

@mattt

@mattt mattt commented Mar 24, 2026

Copy link
Copy Markdown
Owner

Replaces internal, nested Error type that shadowed Swift.Error.

Overhaul documentation comments

Copilot AI 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.

Pull request overview

Makes the typedstream decoder’s parsing errors a public, top-level type to avoid the prior nested Error that shadowed Swift.Error, and adds coverage for the user-facing error descriptions.

Changes:

  • Introduce public top-level TypedStreamDecoderError conforming to LocalizedError.
  • Update TypedStreamDecoder to throw TypedStreamDecoderError instead of the nested error type.
  • Add a unit test validating TypedStreamDecoderError.errorDescription strings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
Tests/iMessageTests/DecodingTests.swift Adds assertions for TypedStreamDecoderError.errorDescription formatting.
Sources/TypedStream/TypedStreamDecoder.swift Replaces nested error with public TypedStreamDecoderError and refreshes decoder documentation/throws.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Sources/TypedStream/TypedStreamDecoder.swift Outdated
Comment thread Sources/TypedStream/TypedStreamDecoder.swift Outdated
Comment thread Sources/TypedStream/TypedStreamDecoder.swift
Comment thread Tests/iMessageTests/DecodingTests.swift Outdated
@mattt
mattt merged commit 8f5f4f1 into main Mar 24, 2026
3 checks passed
@mattt
mattt deleted the mattt/refactor-error branch March 24, 2026 09:40
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