Commit b795af0
committed
feat(worker): MISSING_USER_DATA error when user.json is absent
Discord exports drop user.json (and the entire Account folder) when
the user un-ticks the 'User data' checkbox in the request form. We
need user.json to anchor the rest of the analysis on the package
owner's identity, so a package without it has nothing useful to
compute.
The old code path landed on a KeyError("There is no item named
'Account/user.json' in the archive") and got relabeled UNKNOWN_ERROR
in process_package — multiple users in production hit this and
retried 4+ times before giving up.
Now: when neither find_user_root() nor either legacy fallback locates
a user.json entry, raise MISSING_USER_DATA. The error code is added
to EXPECTED_ERROR_CODES so it surfaces verbatim through the API
status endpoint instead of being squashed.
Frontend follow-up (separate PR): add MISSING_USER_DATA to the status
response type and copy a friendly message asking the user to
re-export with the User data option enabled.1 parent 4aa85e5 commit b795af0
1 file changed
Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
215 | 216 | | |
216 | | - | |
217 | | - | |
| 217 | + | |
| 218 | + | |
218 | 219 | | |
219 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
220 | 228 | | |
221 | 229 | | |
222 | 230 | | |
| |||
993 | 1001 | | |
994 | 1002 | | |
995 | 1003 | | |
996 | | - | |
| 1004 | + | |
997 | 1005 | | |
998 | 1006 | | |
999 | 1007 | | |
| |||
0 commit comments