Skip to content

馃悰 Bug - Related rules list fails to load and error details are not logged in Application Insights#2605

Description

@ssw-yakshaver

Requested by: @Aibono1225 via YakShaver.ai 馃Μ
cc: @Aibono1225, @Marxoz, @PothieuG, @Freego1783

Hi Team!

聽聽馃煡聽聽Watch the video (1 min 46 sec)

聽聽Url from screen share: https://ssw.com.au/rules/admin/index.html#/rules/do-you-have-a-screencloud-master

Pain

In Rules V3 (TinaCMS), the Related Rules selector on the Single Rule page returns an empty list when attempting to add related rules. DevTools shows a 500 error with the message "Failed to fetch rules", which causes the UI to display no results. Although the error is visible at a high level in Application Insights, the detailed error information is missing, making it difficult to diagnose the root cause. The API issue must be fixed and detailed error logging added to Application Insights for the Rules website.

Acceptance Criteria

  1. The Related Rules list loads correctly when clicking the plus (+) button on the Single Rule page.
  2. The backend API for fetching rules no longer returns a 500 error in this scenario.
  3. If an error occurs while fetching related rules, the UI shows a meaningful error state or message instead of an empty list.
  4. Detailed error information (exception message, stack trace, request context) is logged to Application Insights for Rules V3 (TinaCMS).
  5. Application Insights entries allow developers to easily trace and diagnose failures related to fetching rules.

Reproduce Steps

  1. Navigate to Rules V3 (TinaCMS).
  2. Open the Rules repository.
  3. Go to a Single Rule page.
  4. Attempt to edit Related Rules.
  5. Click the plus (+) button to add a related rule.
  6. Observe that the list is empty.
  7. Open browser DevTools and verify a 500 error with "Failed to fetch rules".
  8. Check Application Insights and note that detailed error information is missing.

Screenshot

Screenshot
Figure: Related rules list empty due to failed fetch error

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions