Skip to content

Conversation

@taylorsilva
Copy link
Member

Rendered

Signed-off-by: Aidan Oldershaw aoldershaw@pivotal.io
Co-authored-by: Taylor Silva tsilva@pivotal.io

Signed-off-by: Aidan Oldershaw <aoldershaw@pivotal.io>
Co-authored-by: Taylor Silva <tsilva@pivotal.io>
Signed-off-by: Taylor Silva <tsilva@pivotal.io>
aoldershaw added a commit to aoldershaw/rfcs that referenced this pull request May 10, 2020
Not sure why it's PR concourse#53, when the previous one was concourse#48...perhaps
because of discussions?

Signed-off-by: Aidan Oldershaw <aoldershaw@pivotal.io>
Copy link
Contributor

@chenbh chenbh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this qualifies as a RFC under then new guidelines, it feels like this falls under the Small features which only impact a narrow use case and affect users in an obvious way. category. wdyt?

Comment on lines +28 to +31
{
"type": "MachineReadable",
"message": "human readable"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the jsonAPI idea of enclosing this inside a top level errors field, makes it more obvious it's an error if I forgot to look at the status code

{
  "errors": [
    {
      "type": ...
    }
  ]
}

Comment on lines +34 to +35
If further arbitrary details are required any number of extra keys can be added
to the JSON object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of generating an UUID on 5xx errors? It could make errors a lot easier to track down in the logs


# Proposal

When the Concourse API returns an error (4xx and 5xx status codes) it should
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we differentiate between different levels of verbosity for 4xx vs 5xx codes? 4xx codes usually indicate user error and misuse of the API, in which case a helpful error message would be appreciated. 5xx codes indicate something has gone wrong on the server side and there's nothing the user can really do with the error message.

@taylorsilva
Copy link
Member Author

I agree. Going to close this.

@taylorsilva taylorsilva deleted the standard-api-error-messages branch May 10, 2021 15: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.

4 participants