Skip to content

Enhanced exception handling and validation in AuditlogwebController#18

Open
NoushadPatell wants to merge 1 commit intoopenmrs:mainfrom
NoushadPatell:enhance-exception-handling
Open

Enhanced exception handling and validation in AuditlogwebController#18
NoushadPatell wants to merge 1 commit intoopenmrs:mainfrom
NoushadPatell:enhance-exception-handling

Conversation

@NoushadPatell
Copy link
Copy Markdown

Summary

This PR improves the robustness of the showClassFormAndAudits method by:

  • Adding structured exception handling for ClassNotFoundException, ClassCastException, and general errors.
  • Validating that the selected class is in the list of @Audited classes before loading it via reflection.
  • Logging errors using SLF4J.

Benefits

  • More user-friendly and maintainable error handling
  • Safer class selection to avoid reflection misuse
  • Prepares the controller for i18n-friendly improvements

@nsalifu
Copy link
Copy Markdown
Contributor

nsalifu commented Jul 12, 2025

Hi @NoushadPatell thanks for the PR.

I think because this project is still in progress under gsoc projects, we might not be accepting general contribution PRs.
You may consider sending contributions to other repositories and also doing PR reviews for this one as of now.
We also welcome general feedback and inputs on for this project. You can alwasy review the PRs and make comments on the thread at: Talk Thread Updates and on the wiki: Improve Audit Logging

cc @wikumChamith @ManojLL

@reshma2004
Copy link
Copy Markdown

Hi, Is this issue open? If not, can you please assign me this issue.

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