Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider parsing errors messages are not useful #67

Open
3 tasks done
foosiee opened this issue Feb 22, 2024 · 0 comments
Open
3 tasks done

Provider parsing errors messages are not useful #67

foosiee opened this issue Feb 22, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@foosiee
Copy link
Contributor

foosiee commented Feb 22, 2024

Before opening, please confirm:

Bug Category

Other

Describe the bug

If there is an error with parsing an entities or policy file a generic error is returned

`Err` value: EntitiesError("examples/simple/simple.entities.json")

This message contains no useful information other than the file path.

Examples of where this occurs

Expected behavior

The error from the cedar_policy should be included in the error message as it contains useful information such as serialization issues or schema errors.

https://docs.rs/cedar-policy/latest/cedar_policy/enum.EntitiesError.html

Reproduction steps

Create a entity provider with invalid entities.json file

Code Snippet

No response

Log output

No response

Additional configuration

No response

Operating System

No response

Additional information and screenshots

No response

@foosiee foosiee added bug Something isn't working good first issue Good for newcomers labels Feb 22, 2024
ShiromMakkad pushed a commit that referenced this issue 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 issue 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 issue 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant