Skip to content

Standardize API error handling and JSON parsing across major controllers - #190

Open
ManikaKutiyal wants to merge 1 commit into
PSMRI:mainfrom
ManikaKutiyal:fix/standardize-error-handling-115
Open

Standardize API error handling and JSON parsing across major controllers#190
ManikaKutiyal wants to merge 1 commit into
PSMRI:mainfrom
ManikaKutiyal:fix/standardize-error-handling-115

Standardize API error handling and JSON parsing across major controllers

416df9f
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Aug 10, 2026 in 48s

Quality Gate failed

Annotations

Check failure on line 279 in src/main/java/com/iemr/hwc/controller/common/main/WorklistController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "benRegID" 53 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO88NRw1y5JsAxxqt&open=AZ_rO88NRw1y5JsAxxqt&pullRequest=190

Check failure on line 128 in src/main/java/com/iemr/hwc/controller/cancerscreening/CancerScreeningController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "benRegID" 18 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO86wRw1y5JsAxxqm&open=AZ_rO86wRw1y5JsAxxqm&pullRequest=190

Check warning on line 299 in src/main/java/com/iemr/hwc/controller/adolescent/ChildhoodAdolescenceController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO84rRw1y5JsAxxqa&open=AZ_rO84rRw1y5JsAxxqa&pullRequest=190

Check failure on line 127 in src/main/java/com/iemr/hwc/controller/anc/AntenatalCareController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "visitCode" 14 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO85ZRw1y5JsAxxqg&open=AZ_rO85ZRw1y5JsAxxqg&pullRequest=190

Check warning on line 331 in src/main/java/com/iemr/hwc/controller/generalOPD/GeneralOPDController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO86DRw1y5JsAxxqi&open=AZ_rO86DRw1y5JsAxxqi&pullRequest=190

Check failure on line 122 in src/main/java/com/iemr/hwc/controller/ncdCare/NCDCareController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "visitCode" 8 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO897Rw1y5JsAxxq6&open=AZ_rO897Rw1y5JsAxxq6&pullRequest=190

Check failure on line 89 in src/main/java/com/iemr/hwc/controller/labtechnician/LabTechnicianController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Invalid request" 4 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO84BRw1y5JsAxxqY&open=AZ_rO84BRw1y5JsAxxqY&pullRequest=190

Check warning on line 82 in src/main/java/com/iemr/hwc/controller/adolescent/ChildhoodAdolescenceController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO84rRw1y5JsAxxqZ&open=AZ_rO84rRw1y5JsAxxqZ&pullRequest=190

Check warning on line 96 in src/main/java/com/iemr/hwc/controller/cancerscreening/CancerScreeningController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO86wRw1y5JsAxxql&open=AZ_rO86wRw1y5JsAxxql&pullRequest=190

Check failure on line 129 in src/main/java/com/iemr/hwc/controller/generalOPD/GeneralOPDController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "benRegID" 10 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO86DRw1y5JsAxxqj&open=AZ_rO86DRw1y5JsAxxqj&pullRequest=190

Check warning on line 95 in src/main/java/com/iemr/hwc/controller/common/master/CommonMasterController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO87QRw1y5JsAxxqp&open=AZ_rO87QRw1y5JsAxxqp&pullRequest=190

Check warning on line 665 in src/main/java/com/iemr/hwc/controller/common/main/WorklistController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO88NRw1y5JsAxxqs&open=AZ_rO88NRw1y5JsAxxqs&pullRequest=190

Check warning on line 96 in src/main/java/com/iemr/hwc/controller/generalOPD/GeneralOPDController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO86DRw1y5JsAxxqh&open=AZ_rO86DRw1y5JsAxxqh&pullRequest=190

Check warning on line 286 in src/main/java/com/iemr/hwc/controller/registrar/main/RegistrarController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO89BRw1y5JsAxxqy&open=AZ_rO89BRw1y5JsAxxqy&pullRequest=190

Check warning on line 102 in src/main/java/com/iemr/hwc/utils/http/HTTPRequestInterceptor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace generic exceptions with specific library exceptions or a custom exception.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO80XRw1y5JsAxxqV&open=AZ_rO80XRw1y5JsAxxqV&pullRequest=190

Check warning on line 83 in src/main/java/com/iemr/hwc/controller/covid19/CovidController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO83hRw1y5JsAxxqW&open=AZ_rO83hRw1y5JsAxxqW&pullRequest=190

Check warning on line 93 in src/main/java/com/iemr/hwc/controller/pnc/PostnatalCareController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO8-oRw1y5JsAxxq7&open=AZ_rO8-oRw1y5JsAxxq7&pullRequest=190

Check warning on line 420 in src/main/java/com/iemr/hwc/controller/anc/AntenatalCareController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO85ZRw1y5JsAxxqe&open=AZ_rO85ZRw1y5JsAxxqe&pullRequest=190

Check warning on line 94 in src/main/java/com/iemr/hwc/controller/anc/AntenatalCareController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO85ZRw1y5JsAxxqd&open=AZ_rO85ZRw1y5JsAxxqd&pullRequest=190

Check failure on line 111 in src/main/java/com/iemr/hwc/controller/adolescent/ChildhoodAdolescenceController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "visitCode" 6 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO84rRw1y5JsAxxqc&open=AZ_rO84rRw1y5JsAxxqc&pullRequest=190

Check failure on line 129 in src/main/java/com/iemr/hwc/controller/generalOPD/GeneralOPDController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "visitCode" 10 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO86DRw1y5JsAxxqk&open=AZ_rO86DRw1y5JsAxxqk&pullRequest=190

Check failure on line 127 in src/main/java/com/iemr/hwc/controller/anc/AntenatalCareController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "benRegID" 13 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO85ZRw1y5JsAxxqf&open=AZ_rO85ZRw1y5JsAxxqf&pullRequest=190

Check warning on line 270 in src/main/java/com/iemr/hwc/controller/covid19/CovidController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO83hRw1y5JsAxxqX&open=AZ_rO83hRw1y5JsAxxqX&pullRequest=190

Check warning on line 258 in src/main/java/com/iemr/hwc/controller/common/main/WorklistController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO88NRw1y5JsAxxqq&open=AZ_rO88NRw1y5JsAxxqq&pullRequest=190

Check warning on line 305 in src/main/java/com/iemr/hwc/controller/registrar/main/RegistrarController.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=PSMRI_HWC-API&issues=AZ_rO89BRw1y5JsAxxqz&open=AZ_rO89BRw1y5JsAxxqz&pullRequest=190