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

api: acl bootstrap errors aren't 500 #6421

Merged
merged 4 commits into from
Nov 20, 2019
Merged

Commits on Nov 19, 2019

  1. api: acl bootstrap errors aren't 500

    Noticed that ACL endpoints return 500 status code for user errors.  This
    is confusing and can lead to false monitoring alerts.
    
    Here, I introduce a concept of RPCCoded errors to be returned by RPC
    that signal a code in addition to error message.  Codes for now match
    HTTP codes to ease reasoning.
    
    ```
    $ nomad acl bootstrap
    Error bootstrapping: Unexpected response code: 500 (ACL bootstrap already done (reset index: 9))
    
    $ nomad acl bootstrap
    Error bootstrapping: Unexpected response code: 400 (ACL bootstrap already done (reset index: 9))
    ```
    Mahmood Ali committed Nov 19, 2019
    Configuration menu
    Copy the full SHA
    fd66b9c View commit details
    Browse the repository at this point in the history
  2. 404 if token isn't found

    Mahmood Ali committed Nov 19, 2019
    Configuration menu
    Copy the full SHA
    5a1f6c7 View commit details
    Browse the repository at this point in the history
  3. changelog

    Mahmood Ali committed Nov 19, 2019
    Configuration menu
    Copy the full SHA
    6b25483 View commit details
    Browse the repository at this point in the history
  4. comments and casing

    Mahmood Ali committed Nov 19, 2019
    Configuration menu
    Copy the full SHA
    82a5e3d View commit details
    Browse the repository at this point in the history