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

404 error does not indicate what resource was not found #60

Closed
briskt opened this issue Mar 30, 2023 · 2 comments
Closed

404 error does not indicate what resource was not found #60

briskt opened this issue Mar 30, 2023 · 2 comments

Comments

@briskt
Copy link
Contributor

briskt commented Mar 30, 2023

tfc-ops variables list -o org -w workspace -k key can return a 404 for at least two different reasons: (1) organization name not found, or (2) workspace not found. The error message provided does not look different in the two scenarios:

API returned an error.
	Method: GET
	URL: https://app.terraform.io/api/v2/vars?filter%5Borganization%5D%5Bname%5D=org&filter%5Bworkspace%5D%5Bname%5D=workspace
	Code: 404
	Status: 404 Not Found
	Request Body: 
	Response Body: {"errors":[{"status":"404","title":"not found"}]}
@briskt
Copy link
Contributor Author

briskt commented Mar 30, 2023

To provide a more helpful error message, tfc-ops would probably have to make two separate calls. One to check the validity of the organization name, and one to list the variables.

@briskt
Copy link
Contributor Author

briskt commented Jun 23, 2023

Closed by #68.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant