Skip to content

Commit

Permalink
Update agentops/http_client.py
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
aiswaryasankar and github-actions[bot] authored Oct 28, 2024
1 parent 81ce154 commit 159b677
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions agentops/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,9 @@ def post(
if result.code == 400:
if "message" in result.body:
raise ApiServerException(f"API server: {result.body['message']}")
else:
raise ApiServerException(f"API server: {result.body}")
if result.code == 500:
HttpClient._handle_failed_request(
url, payload, api_key, parent_key, token, "ServerError"
)
raise ApiServerException("API server: - internal server error")

return result
+ HttpClient._handle_failed_request(
+ url, payload, api_key, parent_key, token, "ServerError"
+ )

@staticmethod
def get(
Expand Down

0 comments on commit 159b677

Please sign in to comment.