Skip to content

Add better provider parsing errors messages#68

Merged
ShiromMakkad merged 3 commits intomainfrom
provider_error
Feb 26, 2024
Merged

Add better provider parsing errors messages#68
ShiromMakkad merged 3 commits intomainfrom
provider_error

Conversation

@foosiee
Copy link
Copy Markdown
Contributor

@foosiee foosiee commented Feb 22, 2024

Description of changes

Added cause of error to Entity and Policy provider parsing errors

Issue #, if available

#67

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A backwards-compatible change requiring a minor version bump to cedar-local-agent (e.g., addition of a new API).

I confirm that this PR (choose one, and delete the other options):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor
    version bumps).

Testing

Ran local build

Error difference

// before
EntitiesError("/var/folders/_g/9l0dzppx423c5j0x0b9z_qgm0000gs/T/.tmpXeRe8r")

// after
EntitiesError("/var/folders/_g/9l0dzppx423c5j0x0b9z_qgm0000gs/T/.tmpXeRe8r", Deserialization(Serde(Error("invalid type: map, expected a sequence", line: 1, column: 1)

@foosiee foosiee changed the title Provider parsing errors messages are not useful Add better provider parsing errors messages Feb 22, 2024
@github-actions
Copy link
Copy Markdown

Coverage after merging provider_error into main

86.86%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/public
   simple.rs34.72%100%36.78%26.19%101, 103–107, 126, 146, 148, 151–158, 165–178
   mod.rs5.26%100%5.26%100%
src/public/events
   receive.rs55.10%100%51.28%70%28–29, 36
   core.rs50.98%100%41.38%63.64%133, 138, 156–159, 163–165, 170, 54–55, 77–80
src/public/file
   policy_set_provider.rs72.85%100%60.61%96.15%143, 175
   entity_provider.rs72.27%100%59.59%92.39%182, 189, 194, 228, 247–249
src/public/log
   schema.rs41.19%100%24.52%95.83%173, 349–352, 509, 880, 898–899, 911
   error.rs76.09%100%60.71%100%
   mod.rs59.81%100%57%100%
   event.rs83.33%100%68.18%100%

Copy link
Copy Markdown
Contributor

@mtrottie mtrottie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShiromMakkad ShiromMakkad merged commit 7ba7c25 into main Feb 26, 2024
@ShiromMakkad ShiromMakkad deleted the provider_error branch February 26, 2024 16:56
ShiromMakkad pushed a commit that referenced this pull request Feb 26, 2024
* #67 Add cause of provider error in wrapper error

* Update changelog

* Fix failing test and semvar refactor to avoid major version upgrade
ShiromMakkad pushed a commit that referenced this pull request Feb 26, 2024
* #67 Add cause of provider error in wrapper error

* Update changelog

* Fix failing test and semvar refactor to avoid major version upgrade

Signed-off-by: Shirom Makkad <shirmak11@gmail.com>
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