MCPcopy Create free account
hub / github.com/adobe/Marinus / handle_api_error

Method handle_api_error

python3_cron_scripts/libs3/APIHelper.py:27–41  ·  view source on GitHub ↗

Exits the script execution post setting the status in database. :param err: Exception causing script exit. :param jobs_reference: A string with the job name or the JobsManager for the exiting script.

(self, err, jobs_reference)

Source from the content-addressed store, hash-verified

25 _allowed_giveup_failures = 20
26
27 def handle_api_error(self, err, jobs_reference):
28 """
29 Exits the script execution post setting the status in database.
30 :param err: Exception causing script exit.
31 :param jobs_reference: A string with the job name or the JobsManager for the exiting script.
32 """
33 self._logger.error("FATAL: " + str(err))
34 self._logger.error("Exiting script execution.")
35 if isinstance(jobs_reference, str):
36 jobs_manager = JobsManager.JobsManager(self.MC, jobs_reference)
37 jobs_manager.record_job_error(str(err))
38 else:
39 jobs_reference.record_job_error(str(err))
40
41 exit(1)
42
43 def connection_error_retry(self, details):
44 self._logger.error(

Calls 1

record_job_errorMethod · 0.95

Tested by

no test coverage detected