diff --git a/runpod/serverless/pod_worker.py b/runpod/serverless/pod_worker.py index 589b0955..ef376851 100644 --- a/runpod/serverless/pod_worker.py +++ b/runpod/serverless/pod_worker.py @@ -25,10 +25,10 @@ def start_worker(): try: if 'input' not in next_job: - raise ValueError("Job input not found.") - - job_output, job_duration_ms = job.run(next_job['id'], next_job['input']) - job.post(worker_life.worker_id, next_job['id'], job_output, job_duration_ms) + job.error(worker_life.worker_id, next_job['id'], "No input provided.") + else: + job_output, job_duration_ms = job.run(next_job['id'], next_job['input']) + job.post(worker_life.worker_id, next_job['id'], job_output, job_duration_ms) except (KeyError, ValueError, RuntimeError) as err: job.error(worker_life.worker_id, next_job['id'], str(err)) finally: diff --git a/setup.cfg b/setup.cfg index 145f76c5..877b38a6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = runpod -version = 0.1.13 +version = 0.1.14 description = Official Python library for RunPod API & SDK. long_description = file: README.md long_description_content_type = text/markdown