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

Data field is missing from API errors #5

Closed
davidsbond opened this issue Mar 2, 2022 · 0 comments · Fixed by #6
Closed

Data field is missing from API errors #5

davidsbond opened this issue Mar 2, 2022 · 0 comments · Fixed by #6
Labels
bug Something isn't working

Comments

@davidsbond
Copy link
Collaborator

An error response from the API can contain a data field with additional context for errors. This is specifically used for tests within ACL files. We should add the data field as described in the API documentation

Related to https://github.com/davidsbond/terraform-provider-tailscale/issues/73

@davidsbond davidsbond added the bug Something isn't working label Mar 2, 2022
davidsbond added a commit that referenced this issue Mar 2, 2022
Closes #5

This commit adds the `Data` field to the `APIError` type and provides a helper function `ErrorData` to obtain
the slice of errors from the response. This will allow us to expose errors in ACL tests.

Signed-off-by: David Bond <[email protected]>
davidsbond added a commit that referenced this issue Mar 2, 2022
Closes #5

This commit adds the `Data` field to the `APIError` type and provides a helper function `ErrorData` to obtain
the slice of errors from the response. This will allow us to expose errors in ACL tests.

Signed-off-by: David Bond <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant