-
Notifications
You must be signed in to change notification settings - Fork 4
feat(alarms): Error handling for workspace dependency #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(alarms): Error handling for workspace dependency #428
Conversation
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]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
… 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]>
src/datasources/alarms/constants/AlarmsQueryEditor.constants.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
| expect(container.getByText('WorkspaceName')).toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it('should display error title and description when error occurs', async () => { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
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
extractErrorInfoto retrieve error details (status code and message), and store error messages in theAlarmsDataSourceCorefile.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).FloatingError.🧪 Testing
Added unit tests
✅ Checklist