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

Include parameter validation is a maintenance problem for new valid include options #765

Conversation

brandonc
Copy link
Collaborator

@brandonc brandonc commented Sep 7, 2023

Description

We have forgotten to add new ones to the validation, the server will validate them for us, and the string is already typed. Note that the API behavior is identical with the same error being returned but only after a round trip to the server.

Example server error response (400)

{
  "errors": [
    {
      "status": "400",
      "title": "bad request",
      "detail": "Invalid include parameter"
    }
  ]
}

@brandonc brandonc requested a review from a team as a code owner September 7, 2023 22:42
@brandonc brandonc linked an issue Sep 7, 2023 that may be closed by this pull request
@brandonc brandonc force-pushed the TF-9178-go-tfe-gh-issue-764-project-name-attr-is-not-returned-properly branch from 4d8fbf6 to 7c57ef0 Compare September 8, 2023 01:58
We will forgot to add new ones to the validation and the server will validate them for us.
@brandonc brandonc force-pushed the TF-9178-go-tfe-gh-issue-764-project-name-attr-is-not-returned-properly branch from 7c57ef0 to bdbd165 Compare September 8, 2023 02:02
@@ -887,6 +887,16 @@ func checkResponseCode(r *http.Response) error {
var err error

switch r.StatusCode {
case 400:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.

@brandonc brandonc merged commit 8599405 into main Sep 8, 2023
@brandonc brandonc deleted the TF-9178-go-tfe-gh-issue-764-project-name-attr-is-not-returned-properly branch September 8, 2023 03:45
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

@brandonc
Copy link
Collaborator Author

brandonc commented Sep 8, 2023

Updated CHANGELOG b89bf09

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.

Project name attr is not returned properly
2 participants