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

send_event method does not return http status #121

Open
leandropadua opened this issue Jul 20, 2021 · 3 comments
Open

send_event method does not return http status #121

leandropadua opened this issue Jul 20, 2021 · 3 comments

Comments

@leandropadua
Copy link

Currently the response is not available to the user to make decisions based on the http response code.
For example, the current code will not raise an exception if the API_TOKEN is invalid and will give an impression that it was a successful execution.
The status code is only visible as a debug message (DEBUG: Sending to SignalFx failed (401 Unauthorized)), which is not accessible in code.

with signalfx.SignalFx(ingest_endpoint=SFX_INGESTION_ENDPOINT).ingest(SFX_API_TOKEN) as sfx:
    sfx.send_event(event_type='deployments')
@leandropadua
Copy link
Author

I have proposed a solution in this PR #120

@ghost
Copy link

ghost commented Dec 29, 2021

Seeing the same with sfx.send() function.

@akaars
Copy link

akaars commented Apr 7, 2022

An issue regarding the inability to detect authentication errors was raised in 2016 - #28
Probably it's too complicate to deal with that...

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