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 correct error variants for API errors #31

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Commits on Sep 18, 2024

  1. Return correct error variants for API errors

    Previously, the generated code did not properly take into account the
    HTTP status of error responses.  We would either return
    *Error::UnknownError (if the response message was set) or a serde error
    otherwise.
    
    With this patch, we map the status codes to the corresponding error
    variants and skip deserialization if the response body is empty.
    
    Fixes: #30
    robin-nitrokey committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    246825a View commit details
    Browse the repository at this point in the history