Skip to content

fix: error responses incorrectly reported success: true#294

Open
allamiro wants to merge 1 commit into
lixmal:masterfrom
allamiro:fix/error-success-flags
Open

fix: error responses incorrectly reported success: true#294
allamiro wants to merge 1 commit into
lixmal:masterfrom
allamiro:fix/error-success-flags

Conversation

@allamiro

@allamiro allamiro commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #280.

Problem

Four error responses carried "success": true, so API clients could interpret hard failures as success:

  • db_login 'failed to store key'
  • db_login 'failed to store db'
  • get_user_info 'failed to retrieve session'
  • _close_db 'failed to close db'

Change

All four now return "success": false. No other behavior change.

Testing

Full cargo test suite passes (9/9) in a rust:1.83 container.


Summary by cubic

Fixed four error responses that incorrectly returned "success": true, so clients now correctly detect failures. All affected paths now return "success": false with no other behavior changes.

  • Bug Fixes
    • db_login: "failed to store key"
    • db_login: "failed to store db"
    • get_user_info: "failed to retrieve session"
    • _close_db: "failed to close db"

Written for commit 4445988. Summary will update on new commits.

Review in cubic

Four error paths returned "success": true, which clients could
misread as a successful operation: failed to store key, failed to
store db, failed to retrieve session, failed to close db.
@allamiro allamiro force-pushed the fix/error-success-flags branch from 4445988 to 0394a56 Compare June 13, 2026 00:17
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.

Several error responses return "success": true

1 participant