Skip to content

Classify scheduled function parameter errors - #5937

Open
UllasSHR wants to merge 1 commit into
clockworklabs:masterfrom
UllasSHR:fix/scheduled-function-parameter-errors
Open

UllasSHR wants to merge 1 commit into
clockworklabs:masterfrom
UllasSHR:fix/scheduled-function-parameter-errors

Conversation

@UllasSHR

Copy link
Copy Markdown

Description of Changes

Scheduled function parameter preparation previously returned generic errors, so both scheduler paths logged datastore and BSATN failures, stale schedules, and invalid saved arguments at the same error level.

This change introduces typed errors so the scheduler can preserve that distinction:

  • datastore and BSATN encoding failures use error!
  • missing reducers or procedures and invalid saved arguments use warn!

Both scheduled procedure and reducer paths use the classification. A unit test covers all six error categories.

Addresses #5767.

API and ABI breaking changes

None.

Rollback safety impact

n/a

Expected complexity level and risk

2 - The change is limited to scheduler error classification and logging. It does not change public APIs, database storage, or scheduling behavior.

Testing

  • cargo test --locked -p spacetimedb-core --lib
  • cargo fmt --check -p spacetimedb-core
  • git diff --check

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