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

feat(crates-io): expose HTTP headers and Error type #12310

Merged
merged 6 commits into from
Jul 20, 2023

Commits on Jul 18, 2023

  1. feat(crates-io): expose headers for ResponseError::Api

    In response to RFC 3231 [^1], our registry client need to return headers
    to caller, so that the caller (cargo binary) can continue parsing
    challenge headers.
    
    [^1]: https://rust-lang.github.io/rfcs/3231-cargo-asymmetric-tokens.html#the-authentication-process
    weihanglo committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    6805944 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    00a8727 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ed6692b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a561e8b View commit details
    Browse the repository at this point in the history
  5. refactor(crates-io): remove anyhow

    This removes the dependency `anyhow` and uses our own custom Error
    enum, so that crates-io consumer can access `Error::API::challenge`
    field.
    weihanglo committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    b4499af View commit details
    Browse the repository at this point in the history
  6. refactor(crates-io): use thiserror

    Optionally use `thiserror` to reduce boilerplates but this part can
    be dropped if we don't want.
    weihanglo committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    31b500c View commit details
    Browse the repository at this point in the history