Review main Merged

98058[TASK] Throw only Error objects in TypeScript

Benjamin Kott CR +2 V +2 Normal +56 −60 updated 11/26/26, 12:35

Commit message

Enable @typescript-eslint/only-throw-error, which reports thrown values
that are not an Error. The thrown strings are now errors with the same
message, BackendException extends Error, and two failed DataHandler
results throw an error that keeps their messages as its cause.

AjaxRequest keeps rejecting with the AjaxResponse of a failed request,
since callers read the response from it, so the rule allows that type.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
    • Benjamin Franzke +1
  • Verified V +2 Done
    • Benjamin Kott +2
    • Benjamin Franzke +1
    • core-ci +1 CI

Issues 2

Files 43

Show 23 more files Show less

Review log 914

  1. Benjamin Kott uploaded patch set 1 11/26/26, 10:23

  2. Benjamin Kott uploaded patch set 2 11/26/26, 10:38

  3. core-ci voted on patch set 1 V +1 11/26/26, 10:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115546

  4. Benjamin Kott rebased onto patch set 3 11/26/26, 10:43

  5. core-ci voted on patch set 2 V +1 11/26/26, 10:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115547

  6. core-ci voted on patch set 3 V +1 11/26/26, 10:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115551

  7. Benjamin Kott rebased onto patch set 4 V +1 11/26/26, 11:13

  8. Benjamin Franzke commented on patch set 3 CR +1 11/26/26, 11:15

    It is crazy that it seems that we do not need to a adapt a single `catch`, but it seems that's because we mostly expect no value in catch or `e: unknown`.

    core.ts:241

    lol, nice catch.
  9. core-ci voted on patch set 4 V -1 11/26/26, 11:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115555

  10. Benjamin Kott rebased onto patch set 5 V -1 11/26/26, 12:09

  11. Benjamin Franzke voted on patch set 5 CR +1 V +1 11/26/26, 12:16

  12. core-ci voted on patch set 5 V +1 11/26/26, 12:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115563

  13. Benjamin Kott voted on patch set 5 CR +2 V +2 11/26/26, 12:34

  14. Benjamin Kott merged patch set 6 11/26/26, 12:35