Commit d59ff29
authored
chore: Replace deprecated error reporting service calls with
## Explanation
`error-reporting-service` is deprecated in favour of
`Messenger.captureException`. There were a couple controllers still
using it, which I've fixed in this pull request by replacing the usage
of `ErrorReportingService:captureException` with
`Messenger.captureException`.
## References
<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?
For example:
* Fixes #12345
* Related to #67890
-->
## Checklist
- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Migrates error reporting to the new Messenger API and cleans up the
deprecated dependency.
>
> - Replace calls to `ErrorReportingService:captureException` with
optional `Messenger.captureException` across
`multichain-account-service`, `network-controller`, and tests (e.g.,
`MultichainAccount{Service,Wallet,Group}.ts`, `SnapAccountProvider.ts`,
`NetworkController.ts`, `GasFeeController.test.ts`)
> - Remove `@metamask/error-reporting-service` from `package.json`
dependencies and `yarn.lock`; update CHANGELOGs for affected packages
> - Adjust messengers to expose `captureException` in tests/utilities
and drop related delegated actions
> - Update tests to spy on `captureException` instead of
`messenger.call(...)`; fix types by removing `ErrorReportingService*`
action from allowed actions
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7d112ea. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->Messenger.captureException (#7542)1 parent 18a2ce0 commit d59ff29
File tree
20 files changed
+61
-144
lines changed- packages
- eth-json-rpc-middleware
- gas-fee-controller/src
- multichain-account-service
- src
- providers
- tests
- network-controller
- src
- tests
20 files changed
+61
-144
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 70 | + | |
74 | 71 | | |
75 | 72 | | |
76 | 73 | | |
| |||
93 | 90 | | |
94 | 91 | | |
95 | 92 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 93 | + | |
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
228 | 224 | | |
229 | 225 | | |
230 | 226 | | |
231 | | - | |
| 227 | + | |
232 | 228 | | |
233 | | - | |
234 | | - | |
| 229 | + | |
235 | 230 | | |
236 | 231 | | |
237 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
238 | 236 | | |
239 | 237 | | |
240 | 238 | | |
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 268 | + | |
272 | 269 | | |
273 | 270 | | |
274 | 271 | | |
| |||
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
1044 | 1046 | | |
1045 | 1047 | | |
1046 | 1048 | | |
| |||
1049 | 1051 | | |
1050 | 1052 | | |
1051 | 1053 | | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | 1054 | | |
1059 | 1055 | | |
1060 | 1056 | | |
1061 | 1057 | | |
1062 | 1058 | | |
1063 | | - | |
1064 | | - | |
| 1059 | + | |
| 1060 | + | |
1065 | 1061 | | |
1066 | 1062 | | |
1067 | 1063 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 257 | + | |
261 | 258 | | |
262 | 259 | | |
263 | 260 | | |
| |||
Lines changed: 12 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
| |||
373 | 368 | | |
374 | 369 | | |
375 | 370 | | |
376 | | - | |
| 371 | + | |
377 | 372 | | |
378 | 373 | | |
379 | 374 | | |
380 | 375 | | |
381 | 376 | | |
382 | | - | |
383 | | - | |
| 377 | + | |
384 | 378 | | |
385 | 379 | | |
386 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
387 | 384 | | |
388 | 385 | | |
389 | 386 | | |
| |||
732 | 729 | | |
733 | 730 | | |
734 | 731 | | |
735 | | - | |
| 732 | + | |
736 | 733 | | |
737 | 734 | | |
738 | 735 | | |
739 | | - | |
740 | | - | |
| 736 | + | |
741 | 737 | | |
742 | 738 | | |
743 | | - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
744 | 743 | | |
745 | 744 | | |
746 | 745 | | |
Lines changed: 4 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 262 | + | |
266 | 263 | | |
267 | 264 | | |
268 | 265 | | |
| |||
301 | 298 | | |
302 | 299 | | |
303 | 300 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
| 301 | + | |
308 | 302 | | |
309 | 303 | | |
310 | 304 | | |
| |||
448 | 442 | | |
449 | 443 | | |
450 | 444 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
| 445 | + | |
455 | 446 | | |
456 | 447 | | |
457 | 448 | | |
| |||
624 | 615 | | |
625 | 616 | | |
626 | 617 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 618 | + | |
631 | 619 | | |
632 | 620 | | |
633 | 621 | | |
| |||
0 commit comments