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

[WIP] Support error types other than dropshot::HttpError #1164

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Commits on Nov 4, 2024

  1. sketch example (won't compile)

    hawkw committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    b937d69 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. Configuration menu
    Copy the full SHA
    a6d4113 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    366002e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4c1bfac View commit details
    Browse the repository at this point in the history
  4. fixup some stuff

    hawkw committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    66e115e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1f6cd7b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    afb3475 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. Configuration menu
    Copy the full SHA
    e972811 View commit details
    Browse the repository at this point in the history
  2. clippy placation

    hawkw committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    b19f539 View commit details
    Browse the repository at this point in the history
  3. tweak APIs

    hawkw committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    507dc18 View commit details
    Browse the repository at this point in the history
  4. fix examples

    hawkw committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    78ecabf View commit details
    Browse the repository at this point in the history
  5. TRYBUILD=overwrite

    hawkw committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    aae766e View commit details
    Browse the repository at this point in the history
  6. oh there's expectorate too

    hawkw committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    ca3c8fa View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0a8c2c5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    dd3cc93 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3c6bcb7 View commit details
    Browse the repository at this point in the history
  10. add recommended_status_code() to dropshot errors

    As I proposed in [this comment][1]. This is intended to be used by user
    code that constructs its own error type from Dropshot's errors, to make
    it easier to get the same status codes that are used by `HttpError` when
    the custom user error type just structures the response differently, or
    only wishes to override a small subset of Dropshot errors. Perhaps this
    should be a trait eventually --- I'm kinda on the fence about this.
    
    We may also want to do a similar "recommended headers" thing, since some
    error conditions are supposed to return specific headers, like which
    methods are allowed for a Method Not Allowed error code, or the desired
    protocol to upgrade to for a 426 Upgrade Required error.
    
    While I was here, I also changed some error variants to return more
    correct status codes --- a bunch of stuff currently just returns 400 Bad
    Request when it should really return a more specific error like 426
    Upgrade Required etc.
    
    [1]: #1164 (comment)
    hawkw committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    f54bca9 View commit details
    Browse the repository at this point in the history
  11. keep internal errors internal

    hawkw committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    2b06b58 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    860ad38 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2024

  1. rustfmt etc

    hawkw committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ed8614b View commit details
    Browse the repository at this point in the history