Skip to content

feat!: replace unit error types with typed errors - #51

Merged
dpazj merged 2 commits into
masterfrom
feat/proper-error-types
Nov 2, 2026
Merged

dpazj merged 2 commits into
masterfrom
feat/proper-error-types

Conversation

@dpazj

@dpazj dpazj commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Replaces the remaining Result<_, ()> error types with typed errors across the client, app, edge-node, and types crates.

This is a breaking change for the affected public APIs.

Client

  • Add an opaque srad_client::ClientError wrapping Box<dyn Error + Send + Sync>.
  • Return ClientError from all Client methods.
  • Keep DynClient object-safe by using a single concrete error type.
  • Map rumqttc errors into ClientError without exposing backend-specific variants.

App

  • AppClient publish methods now return ClientError.
  • Add BdseqError for missing, invalid, and out-of-range BDSEQ values.
  • PayloadError::InvalidBdseq now carries the underlying BdseqError.
  • Fix the previously swapped InvalidBdseq / MissingTimestamp messages.

EoN

  • Add PublishError::Client and propagate client failures instead of masking them as StateError::Offline.
  • node_birth now returns PublishError and logs the actual failure.
  • Add MessageMetricError and MessageMetricsError.

Types

  • Add DataTypeError, QualityError, PropertyValueError, and PropertySetError.
  • PropertySet::insert reports ReservedQuality.
  • Add TemplateError::MissingValue and TemplateError::ValueConversion.
  • Template derive output now propagates typed conversion errors instead of discarding them.

dpazj added 2 commits November 2, 2026 22:10
- Add srad_client::ClientError and return it from Client methods
- Propagate client errors through srad-app and srad-eon
- Add BdseqError, MessageMetricError and MessageMetricsError
- Add DataTypeError, QualityError, Property/PropertySet errors
- Propagate typed template conversion errors through srad-macros
- Remove remaining Result<_, ()> error types and add coverage
Wrap the underlying boxed error instead of exposing channel/queue variants.
@dpazj
dpazj merged commit 3fc66fd into master Nov 2, 2026
6 checks passed
@dpazj
dpazj deleted the feat/proper-error-types branch November 2, 2026 22:14
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.

1 participant