Commit 03691d8
authored
feat: add error_type to RehydrationPasswordFailed event (#37373)
## **Description**
Added `error_type` property to the `RehydrationPasswordFailed` analytics
event to distinguish between:
- `'incorrect_password'`: Wrong password entered
- `'unknown_error'`: Other errors
This provides better visibility into rehydration failure reasons
[](https://codespaces.new/MetaMask/metamask-extension/pull/37373?quickstart=1)
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/SL-240
## **Manual testing steps**
1. Set up a social login account during onboarding
2. Lock the wallet
3. Try to unlock with incorrect password
4. Verify `RehydrationPasswordFailed` event includes `error_type:
'incorrect_password'`
## **Screenshots/Recordings**
N/A - Analytics enhancement only
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds `error_type` ('incorrect_password' | 'unknown_error') to
`RehydrationPasswordFailed` during social rehydration in
`unlock-page.component.js`.
>
> - **Analytics**
> - In `ui/pages/unlock-page/unlock-page.component.js`:
> - Determine error type from `message` (including
`SeedlessOnboardingControllerErrorMessage.IncorrectPassword`).
> - Add `error_type` to `RehydrationPasswordFailed` event properties
during rehydration (`incorrect_password` or `unknown_error`).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
93ffae6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 54b58db commit 03691d8
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
252 | 260 | | |
253 | 261 | | |
254 | 262 | | |
| |||
257 | 265 | | |
258 | 266 | | |
259 | 267 | | |
| 268 | + | |
260 | 269 | | |
261 | 270 | | |
262 | 271 | | |
| |||
0 commit comments