Review main Merged

76974[TASK] Align error responses in ReactionResolver

Oli Bartsch CR +2 V +2 Easy +19 −13 updated 12/12/22, 09:56

Commit message

Error responses now use the same format in
ReactionResolver as well as in the reaction.

Additionally, a new method allows to cleanup
some duplicated code and the default status
code is 400, since 503 indicates a server error,
which is not the case for the current errors. All
of them are client errors: wrong identifier, invalid
payload, etc...

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Andreas Kienast +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Andreas Kienast +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 2229

Show 4 earlier messages
  1. Oli Bartsch uploaded patch set 1 12/07/22, 21:22

  2. Oliver Klee commented on patch set 1 CR -1 12/07/22, 21:24

    Issue ID missing
  3. Oli Bartsch updated the commit message in patch set 2 CR -1 12/07/22, 21:25

  4. Oliver Klee commented on patch set 2 12/07/22, 21:28

    Reply

    Done
  1. Oliver Klee wrote 12/07/22, 21:28

    Removed reviewer Oliver Klee.
  2. core-ci voted on patch set 2 V +1 12/07/22, 21:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34778

  3. core-ci voted on patch set 1 V +1 12/07/22, 21:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34777

  4. Oli Bartsch uploaded patch set 3 V +1 12/08/22, 22:28

  5. core-ci voted on patch set 3 V +1 12/08/22, 22:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34818

  6. Andreas Kienast voted on patch set 3 CR +1 12/09/22, 12:36

  7. Christian Kuhn commented on patch set 3 12/10/22, 15:27

    Related: #98373
  8. Oli Bartsch uploaded patch set 4 CR +1 V +1 12/12/22, 07:51

  9. Andreas Kienast voted on patch set 4 CR +1 12/12/22, 07:52

  10. Oli Bartsch updated the commit message in patch set 5 CR +1 12/12/22, 07:53

  11. Oli Bartsch commented on patch set 5 12/12/22, 07:53

    Reply

    Done
  12. Andreas Kienast voted on patch set 5 CR +1 12/12/22, 07:53

  13. core-ci voted on patch set 4 V +1 12/12/22, 08:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34901

  14. core-ci voted on patch set 5 V +1 12/12/22, 08:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34902

  15. Benni Mack voted on patch set 5 V +1 CR +1 12/12/22, 08:07

  16. Daniel Goerz commented on patch set 5 12/12/22, 09:14

    ReactionResolver.php:74

    No secret or invalid secret should get be a 401 Unauthorized response IMO

    ReactionResolver.php:86

    Isn't this still a server side error?
  17. Oli Bartsch uploaded patch set 6 CR +1 V +1 12/12/22, 09:19

  18. Oli Bartsch uploaded patch set 7 12/12/22, 09:25

  19. Oli Bartsch commented on patch set 7 12/12/22, 09:27

    ReactionResolver.php:74 Reply

    Done

    ReactionResolver.php:86 Reply

    No, this exception is only thrown at this place in case a ReactionInstruction with an unknown reaction type is resolved. This means actually still a client error but as for the invalid identifier, this should be a 404 response. Changed it as discussed.
  20. Andreas Kienast voted on patch set 7 V +1 CR +1 12/12/22, 09:30

  21. core-ci voted on patch set 7 V +1 12/12/22, 09:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34905

  22. core-ci voted on patch set 6 V +1 12/12/22, 09:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34904

  23. Benni Mack voted on patch set 7 V +1 CR +1 12/12/22, 09:48

  24. Oli Bartsch voted on patch set 7 V +2 CR +2 12/12/22, 09:56

  25. Oli Bartsch merged patch set 8 12/12/22, 09:56