Skip to content

fix(plugin-redis): throw on unexpected operation instead of crashing the host#1498

Merged
datlechin merged 1 commit into
mainfrom
fix/plugin-redis-throw-unexpected-op
May 29, 2026
Merged

fix(plugin-redis): throw on unexpected operation instead of crashing the host#1498
datlechin merged 1 commit into
mainfrom
fix/plugin-redis-throw-unexpected-op

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

Phase 9 (R-009): remove a user-triggerable host crash from the Redis driver. The 7 default: fatalError("Unexpected operation in execute…Operation") branches in RedisPluginDriver now throw RedisPluginError(code: 0, message: …). The dispatch methods are already async throws, so an unexpected operation surfaces as a normal query error instead of crashing the whole app via fatalError.

Risk Addressed

  • R-009: plugin runtime path guarded by fatalError could take down the host process.

Verification

  • xcodebuild -scheme RedisDriver build succeeds.
  • Line-neutral change (one fatalError line → one throw line each); no behavior change on the happy path.

Notes

  • ABI bump required: no (plugin internals only, no protocol change). Bundled plugin, ships with the next app build.
  • Docs updated: no.
  • No CHANGELOG entry: these are unreachable defensive default: branches, so there is no observable behavior change.
  • Pre-existing swiftlint --strict warnings in this file (file_length 1426, plus an implicit_return/vertical_whitespace on untouched lines) are out of scope; this change doesn't add or remove lines.

@datlechin datlechin merged commit ab4bedd into main May 29, 2026
3 checks passed
@datlechin datlechin deleted the fix/plugin-redis-throw-unexpected-op branch May 29, 2026 21:06
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