Fix the Malware Blocker page not displaying validation errors#473
Merged
Fix the Malware Blocker page not displaying validation errors#473
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes validation error display on the Malware Blocker settings page by adding client-side validation for blocklist configuration and improving server-side error message handling.
Changes:
- Added validation to ensure at least one blocklist is configured when malware blocker is enabled
- Enhanced error handling to display server validation messages for 400 status codes
- Updated error interceptor to handle plain string error responses from the server
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| code/frontend/src/app/features/settings/malware-blocker/malware-blocker.component.ts | Added noBlocklistError computed validation, integrated it into hasErrors(), and updated save error handler to display server messages for 400 errors |
| code/frontend/src/app/features/settings/malware-blocker/malware-blocker.component.html | Bound the noBlocklistError() to the accordion's error property to display validation messages |
| code/frontend/src/app/core/interceptors/error.interceptor.ts | Added handling for plain string error responses before falling back to JSON error parsing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.