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

add default value for LOG10_URL if not set in env #332

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

wenzhe-log10
Copy link
Collaborator

@wenzhe-log10 wenzhe-log10 commented Oct 18, 2024

No description provided.

@@ -99,9 +99,6 @@ def post_request(url: str, json_payload: dict = {}) -> requests.Response:
raise


post_session_request = functools.partial(post_request, url + "/api/sessions", {})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused function

@wenzhe-log10 wenzhe-log10 requested review from kxtran and nqn October 18, 2024 22:33
Copy link
Collaborator

@kxtran kxtran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼 % error messages comment

Comment on lines 32 to 33
token = os.environ.get("LOG10_TOKEN")
org_id = os.environ.get("LOG10_ORG_ID")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think of error messages when token and org_id aren't being set?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added exception handle for 401 http error, similar to what we did in _httpx_utils.py

@wenzhe-log10 wenzhe-log10 merged commit c406c5a into main Oct 18, 2024
2 of 3 checks passed
@wenzhe-log10 wenzhe-log10 deleted the wenzhe/set_default_log10_url branch October 18, 2024 23:01
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

Successfully merging this pull request may close these issues.

2 participants