MCPcopy Create free account
hub / github.com/mlco2/codecarbon / _log_error

Method _log_error

codecarbon/core/api_client.py:344–353  ·  view source on GitHub ↗
(self, url, payload, response)

Source from the content-addressed store, hash-verified

342 return r.json()
343
344 def _log_error(self, url, payload, response):
345 if len(payload) > 0:
346 logger.error(
347 f"ApiClient Error when calling the API on {url} with : {json.dumps(payload)}"
348 )
349 else:
350 logger.error(f"ApiClient Error when calling the API on {url}")
351 logger.error(
352 f"ApiClient API return http code {response.status_code} and answer : {response.text}"
353 )
354
355 def close_experiment(self):
356 """

Callers 13

check_authMethod · 0.95
create_organizationMethod · 0.95
get_organizationMethod · 0.95
update_organizationMethod · 0.95
create_projectMethod · 0.95
get_projectMethod · 0.95
add_emissionMethod · 0.95
_create_runMethod · 0.95
add_experimentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected