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

Return Error::ResponseError for API errors #25

Merged
merged 1 commit into from
May 15, 2024
Merged

Return Error::ResponseError for API errors #25

merged 1 commit into from
May 15, 2024

Conversation

robin-nitrokey
Copy link
Member

Due to a bug in the error handling code, we previously returned Error::Transport for API errors. With this patch, we correctly return Error::ResponseError. This also means that the error message from the NetHSM can be accessed using the content field of the ResponseContent. Unfortunately, it is not yet deserialized as it is not described in the API spec.

Fixes: #21

Due to a bug in the error handling code, we previously returned
Error::Transport for API errors.  With this patch, we correctly return
Error::ResponseError.  This also means that the error message from the
NetHSM can be accessed using the content field of the ResponseContent.
Unfortunately, it is not yet deserialized as it is not described in the
API spec.

Fixes: #21
@robin-nitrokey robin-nitrokey merged commit ea9859b into main May 15, 2024
6 checks passed
@robin-nitrokey robin-nitrokey deleted the error branch May 15, 2024 17:36
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.

Include response in errors
1 participant