[PM-13730] Return Policy object instead of NotFoundException
đī¸ Tracking
đ Objective
This PR removes the thrown NotFoundException when policies are not found and returns a default Policy object with the same Type sent in the request and the Enabled value set to false
â° Reminders before review
- Contributor guidelines followed
- All formatters and local linters executed and passed
- Written new unit and / or integration tests where applicable
- Protected functional changes with optionality (feature flags)
- Used internationalization (i18n) for all UI strings
- CI builds passed
- Communicated to DevOps any deployment requirements
- Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team
đĻŽ Reviewer guidelines
- đ (
:+1:) or similar for great changes - đ (
:memo:) or âšī¸ (:information_source:) for notes or general info - â (
:question:) for questions - đ¤ (
:thinking:) or đ (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - đ¨ (
:art:) for suggestions / improvements - â (
:x:) or â ī¸ (:warning:) for more significant problems or concerns needing attention - đą (
:seedling:) or âģī¸ (:recycle:) for future improvements or indications of technical debt - â (
:pick:) for minor or nitpick changes
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 41.79%. Comparing base (
1fb366d) to head (9005f25). Report is 35 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4911 +/- ##
==========================================
+ Coverage 41.75% 41.79% +0.04%
==========================================
Files 1363 1364 +1
Lines 63915 64029 +114
Branches 5853 5874 +21
==========================================
+ Hits 26686 26762 +76
- Misses 36026 36063 +37
- Partials 1203 1204 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Checkmarx One â Scan Summary & Details â b7aabb28-2bf0-4a76-a027-597dc8bf8cc0
New Issues
| Severity | Issue | Source File / Package | Checkmarx Insight |
|---|---|---|---|
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 185 | Query to find passwords and secrets in infrastructure code. |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 92 | Query to find passwords and secrets in infrastructure code. |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 80 | Query to find passwords and secrets in infrastructure code. |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 69 | Query to find passwords and secrets in infrastructure code. |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 111 | Query to find passwords and secrets in infrastructure code. |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 189 | Query to find passwords and secrets in infrastructure code. |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 182 | Query to find passwords and secrets in infrastructure code. |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 105 | Query to find passwords and secrets in infrastructure code. |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 515 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /cleanup-rc-branch.yml: 21 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /_move_finalization_db_scripts.yml: 27 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /_move_finalization_db_scripts.yml: 103 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 207 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 631 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 548 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 582 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 548 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 582 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 515 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 631 | Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps... |
Fixed Issues
| Severity | Issue | Source File / Package |
|---|---|---|
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 104 |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 91 |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 79 |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 68 |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 188 |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 110 |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 184 |
![]() |
Passwords And Secrets - Generic Password | /test-database.yml: 181 |
![]() |
CSRF | /src/Api/AdminConsole/Controllers/PoliciesController.cs: 148 |
![]() |
CSRF | /src/Api/AdminConsole/Controllers/PoliciesController.cs: 78 |
![]() |
CSRF | /src/Api/AdminConsole/Controllers/PoliciesController.cs: 61 |
![]() |
CSRF | /src/Api/AdminConsole/Controllers/PoliciesController.cs: 148 |
![]() |
CSRF | /src/Api/AdminConsole/Controllers/PoliciesController.cs: 78 |
![]() |
CSRF | /src/Api/AdminConsole/Controllers/PoliciesController.cs: 61 |
![]() |
Unpinned Actions Full Length Commit SHA | /_move_finalization_db_scripts.yml: 102 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 206 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 547 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 581 |
![]() |
Unpinned Actions Full Length Commit SHA | /_move_finalization_db_scripts.yml: 26 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 514 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 630 |
![]() |
Unpinned Actions Full Length Commit SHA | /cleanup-rc-branch.yml: 20 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 581 |
![]() |
Unpinned Actions Full Length Commit SHA | /_move_finalization_db_scripts.yml: 26 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 630 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 206 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 514 |
![]() |
Unpinned Actions Full Length Commit SHA | /cleanup-rc-branch.yml: 20 |
![]() |
Unpinned Actions Full Length Commit SHA | /build.yml: 547 |
![]() |
Unpinned Actions Full Length Commit SHA | /_move_finalization_db_scripts.yml: 102 |
@r-tome Still a bit shaky on exactly how nunit works, but I think I have the general gist for what these tests should do. Definitely open to more feedback, if these seem totally off base let me know.


