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

List[XXX]Complete should return the last HttpResponse #716

Closed
1 task done
tombuildsstuff opened this issue Nov 6, 2023 · 1 comment · Fixed by hashicorp/pandora#3344
Closed
1 task done

List[XXX]Complete should return the last HttpResponse #716

tombuildsstuff opened this issue Nov 6, 2023 · 1 comment · Fixed by hashicorp/pandora#3344
Assignees
Labels
bug Something isn't working upstream/pandora

Comments

@tombuildsstuff
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Service Used

API Versions Used

Description

Example:

type ListByDatabaseCompleteResult struct {
Items []ReplicationLink
}

The ListByDatabaseComplete method returns only a slice of the result object - which makes sense in the happy path, however when the API does something unexpectedly (like returning a 404 when the list contains no items) - the ListByDatabaseCompleteResult object doesn't contain the HTTP Response, meaning it's not possible to validate this).

As such we'll want to extend the List[XXX]Complete method such that both it and it's List[XXX]Result:

  1. Return the Result as a pointer (to handle the unhappy path)
  2. Add the last HTTP Response (so that we can handle 404's etc)

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream/pandora
Projects
None yet
1 participant