Skip to content

Conversation

@andrebispo5
Copy link
Contributor

@andrebispo5 andrebispo5 commented Sep 25, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-20977

📔 Objective

Update app to use new error type from sdk:
#5922
https://bitwarden.atlassian.net/browse/PM-23785

Error handling improvements

  • Catch BitwardenException.DeriveKeyConnector and check if the underlying exception is DeriveKeyConnectorException.WrongPassword, returning a dedicated error result for wrong passwords.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2025

Logo
Checkmarx One – Scan Summary & Details91845bc7-e760-496a-8b5a-e96658598e3a

Great job! No new security vulnerabilities introduced in this pull request

}

else -> DeriveKeyConnectorResult.Error(exception)
else -> DeriveKeyConnectorResult.Error(error = ex)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this exhaustive:

when (ex.v1) {
    is DeriveKeyConnectorException.WrongPassword -> {
        DeriveKeyConnectorResult.WrongPasswordError
    }

    is DeriveKeyConnectorException.Crypto -> {
        DeriveKeyConnectorResult.Error(error = ex)
    }
}

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.31%. Comparing base (3edd5bd) to head (0c174db).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #5937    +/-   ##
========================================
  Coverage   84.30%   84.31%            
========================================
  Files         721      721            
  Lines       54077    54178   +101     
  Branches     7436     7449    +13     
========================================
+ Hits        45591    45680    +89     
- Misses       5877     5886     +9     
- Partials     2609     2612     +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrebispo5 andrebispo5 added this pull request to the merge queue Sep 26, 2025
Merged via the queue into main with commit 2694138 Sep 26, 2025
9 checks passed
@andrebispo5 andrebispo5 deleted the pm-20977/sdk_error_code branch September 26, 2025 15:16
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.

3 participants