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

Add function name to errors and logs #147

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

ionut-arm
Copy link
Member

Adding the name of the function that lead to a backend error to the log messages it generates and to the error returned to the client.

cc @ellerh

wiktor-k
wiktor-k previously approved these changes Jun 5, 2023
Copy link
Collaborator

@wiktor-k wiktor-k left a comment

Choose a reason for hiding this comment

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

LGTM 👍

cryptoki/src/error/mod.rs Outdated Show resolved Hide resolved
cryptoki/src/context/general_purpose.rs Outdated Show resolved Hide resolved
cryptoki/src/error/mod.rs Show resolved Hide resolved
@wiktor-k
Copy link
Collaborator

@ionut-arm it seems this is largely OK to merge (after fixing conflicts). Is there anything else you'd like to add to it?

@ionut-arm
Copy link
Member Author

@ionut-arm it seems this is largely OK to merge (after fixing conflicts). Is there anything else you'd like to add to it?

Ok, I've incorporated your feedback, I don't think I can easily avoid breaking the interface since we rely on enums for errors..

Adding the name of the function that lead to a backend error to the log
messages it generates and to the error returned to the client.

Signed-off-by: Ionut Mihalcea <[email protected]>
Copy link
Collaborator

@wiktor-k wiktor-k left a comment

Choose a reason for hiding this comment

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

Okay, I think this looks good 👍 I'm a bit worried about extending Error enum but if you bump version on release it should be fine.

Thanks for this change! I think it will make debugging quite a bit easier!

Copy link
Contributor

@gowthamsk-arm gowthamsk-arm left a comment

Choose a reason for hiding this comment

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

Apologies for the delay. LGTM :)

@gowthamsk-arm gowthamsk-arm merged commit b999304 into parallaxsecond:main Jan 8, 2024
7 checks passed
@gowthamsk-arm gowthamsk-arm mentioned this pull request Jan 9, 2024
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