Skip to content

fix(streaming): document NotInitialized guard on upgrade() closes #462 - #640

Merged
Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
joshfatoye0011-bit:fix/462-upgrade-not-initialized-error
Aug 27, 2026
Merged

Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
joshfatoye0011-bit:fix/462-upgrade-not-initialized-error

Conversation

@joshfatoye0011-bit

Copy link
Copy Markdown
Contributor

Summary Closes #462 upgrade() was already using .ok_or(StreamError::NotInitialized)? — consistent with pause(), unpause(), and migrate() — but the function doc comment didn't document the error variants it can return, making the contract implicit. ## Changes - Added a # Errors section to the upgrade() doc comment in contracts/streaming/src/lib.rs explicitly listing: - StreamError::NotInitialized — contract has not been initialized yet - StreamError::Unauthorized — caller does not match the stored admin ## Testing No logic changes. The error behaviour was already correct; this commit makes it explicit in the public API docs.

…wwStar#462 upgrade() already uses .ok_or(StreamError::NotInitialized)? consistent with pause/unpause/migrate, but lacked doc comments to make the error contract explicit. Added # Errors section to the upgrade() doc comment listing both NotInitialized and Unauthorized return variants.
@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@joshfatoye0011-bit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Austinaminu2
Austinaminu2 merged commit f50b41a into FlowwStar:main Aug 27, 2026
2 of 7 checks passed

This branch had an error being deployed

1 failed deployment
staging — c314ea20 Deployed Aug 26, 2026 by joshfatoye0011-bit via deploy-staging #206
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.

Fix opaque panic in upgrade()'s admin lookup

2 participants