Skip to content

Add error alerts and badge for webhooks

What does this MR do and why?

Add alert and badge for webhooks that are disabled due to errors. The previous MR !76743 (merged) handled rate-limited webhooks.

This MR also cleans up the code and adds all these error alerts to all views on the project / group / instance level.

Changelog: added

Screenshots or screen recordings

Page 4xx error (permanently disabled) 5xx error (temporarily disabled)
Webhooks index Webhooks_index_4xx_errors Webhooks_index_5xx_errors
Webhooks edit Webhooks_edit_4xx_errors Webhooks_edit_5xx_errors

How to set up and validate locally

  • Visit Project > Settings > Webhooks (for example, http://127.0.0.1:3000/gitlab-org/gitlab-shell/-/hooks).
  • Add at least 1 webhook (you can use any URL).
  • Force some of the UI elements to render by adding || true to the conditions.
  • Click Edit next to the webhook to view the alert (again by force rendering UI elements).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #343990 (closed)

Edited by Justin Ho Tuan Duong

Merge request reports