Add godoc to the exported workflow.ErrInvalidInputType sentinel error#695
Add godoc to the exported workflow.ErrInvalidInputType sentinel error#695PratikDhanave wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds missing GoDoc for the exported workflow.ErrInvalidInputType sentinel error so downstream callers understand when it’s returned and that it should be matched with errors.Is.
Changes:
- Added a doc comment for
workflow.ErrInvalidInputTypedescribing the condition under which it is returned. - Documented that callers should match the sentinel via
errors.Is.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e77e775 to
97b6750
Compare
This comment has been minimized.
This comment has been minimized.
Add a godoc comment to the exported ErrInvalidInputType var explaining that it is returned (wrapped) when a message enqueued as workflow input has a type the start executor does not accept, and that callers can match it with errors.Is.
97b6750 to
0ec8c1f
Compare
Parity Review: ✅ No IssuesThis PR adds a godoc comment to the existing exported Scope determination: Out of scope for cross-repo parity concerns. No new or changed exported Go contracts are introduced. Label: Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
What
Add a doc comment to
workflow.ErrInvalidInputType, currently the only exported symbol inworkflow/errors.goand the only one lacking godoc. The comment documents that the error is returned (wrapped with%w) when a message enqueued as workflow input has a type the workflow's start executor does not accept, and that callers can match it witherrors.Is.Why
ErrInvalidInputTypeis a sentinel meant to be matched: it is wrapped inworkflow/inproc/runner.goandworkflow/internal/execution/run.go, anderrors.Is(err, workflow.ErrInvalidInputType)is already exercised inworkflow/inproc/events_test.go. Without godoc, callers get no signal that this is a matchable sentinel or when it fires. Documenting exported sentinel errors matches the conventions used across the .NET and Python SDKs (and idiomatic Go), where such sentinels carry an explicit contract for consumers.Testing
Docs-only change.
go build ./...,go vet ./workflow/..., andgo test ./workflow/...all pass; the existingerrors.Istest is unchanged and still passes.