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

403 Forbidden after 467634b4 #301

Open
dhduvall opened this issue Nov 7, 2024 · 2 comments
Open

403 Forbidden after 467634b4 #301

dhduvall opened this issue Nov 7, 2024 · 2 comments

Comments

@dhduvall
Copy link

dhduvall commented Nov 7, 2024

I updated this morning and everything stopped working. I got a stream of things like

2024-11-07 10:48:27,849 - WARNING - [users - ] - error while running pre-apply hook: 403 Forbidden - {"errors":["Forbidden"]}
2024-11-07 10:48:28,085 - WARNING - [teams - ] - error while running pre-apply hook: 403 Forbidden - {"errors":["Forbidden"]}

When I backed off to the previous commit, it started working again. I guess my app key doesn't have permission to write metrics?

Putting a try/except around those two lines allowed it to work again.

@skarimo
Copy link
Member

skarimo commented Nov 11, 2024

Hello, you are correct. Your app key probably does not have permission to push metrics. Could you try disabling emission by setting --send-metrics false?

@dhduvall
Copy link
Author

Yes, --send-metrics false works around the problem. I don't understand why the key doesn't have the permissions—it's created by a user with the Datadog Admin Role and has no scopes, and I'd expect that to be able to do everything, including writing metrics, as it's enabled for the role. But I see that the try/except is better done in CustomClient.send_metric()

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

No branches or pull requests

2 participants