Skip to content

Conversation

Ahalya-ni
Copy link
Collaborator

@Ahalya-ni Ahalya-ni commented Oct 8, 2025

Pull Request

🤨 Rationale

User Story 3283306: FE | Error Handling of query builder
Task 3249471: Error handling for workspace cache

This PR introduces error handling for dependencies such as workspaces.

👩‍💻 Implementation

  • Utilized extractErrorInfo to retrieve error details (status code and message), and store error messages in the AlarmsDataSourceCore file.
  • Created a new constant, ERROR_SEVERITY_WARNING, to represent the warning severity. This will be reused across components for various query types (list alarms, alarms count, and alarm trend).
  • Displayed the error title and description in the UI using FloatingError.
image

🧪 Testing

Added unit tests

✅ Checklist

Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Base automatically changed from users/ahalya/feat/alarms/workspace-cache to main October 9, 2025 11:17
… into users/ahalya/feat/alarms/error-handling-for-dependency
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
@Ahalya-ni Ahalya-ni requested a review from manisha-ni October 9, 2025 12:04
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
@Ahalya-ni Ahalya-ni marked this pull request as ready for review October 13, 2025 11:16
expect(container.getByText('WorkspaceName')).toBeInTheDocument();
});

it('should display error title and description when error occurs', async () => {
Copy link
Collaborator

@kartheeswaran-ni kartheeswaran-ni Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In run time, this component will be rendered first and the load workspace method will be called, right?

So, I feel errorTitle and errorDescription should be set inside the mockDatasource.loadWorkspaces spy.

Isn't that feasible?

})
);

private handleDependenciesError(error: unknown): void {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method seems to be common across data sources. I don't know why we are duplicating things. Please create a TD outside of this feature to move these methods to shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants