docs: Add documentation on non-2xx status code handling#583
docs: Add documentation on non-2xx status code handling#583micahjsmith wants to merge 1 commit intohashicorp:mainfrom
Conversation
The documentation is not explicit about whether non-2xx status codes cause the request to fail and whether the user should handle 4xx codes like 429. However, from https://github.com/hashicorp/terraform-provider-http/blob/main/CHANGELOG.md#300-july-27-2022 it is clear that the request succeeds in this case and the user should in fact use a postcondition if they require a success response.
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
austinvalle
left a comment
There was a problem hiding this comment.
Hi @micahjsmith 👋🏻, thanks for the PR!
This seems like a reasonable change to me, although you'll need to do two things before we can merge it:
- The documentation is actually generated (
make generateon your local machine) from the schema, which can be found here:So you'll need to update that location as well (eventually when we run the CI you'd get an error message describing that).terraform-provider-http/internal/provider/data_source_http.go
Lines 52 to 68 in 821d4c5
- HashiCorp requires that you sign the CLA agreement before we can merge the PR, it looks like our internal bot added two comments to the PR, but both links should be the same: #583 (comment) . If you sign that (or already have) and the PR doesn't update to reflect that, let me know and I'll check with the folks internal who run that 👍🏻
Description
The documentation is not explicit about whether non-2xx status codes cause the request to fail and whether the user should handle 4xx codes like 429. However, from https://github.com/hashicorp/terraform-provider-http/blob/main/CHANGELOG.md#300-july-27-2022 it is clear that the request succeeds in this case and the user should in fact use a postcondition if they require a success response.
Rollback Plan
n/a - docs only change
Changes to Security Controls
n/a - docs only change