Skip to content

Commit

Permalink
Handle missing status/applicationState fields
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewrossi committed Dec 1, 2024
1 parent db7c0d0 commit 6fc567e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/data-sanitization-service/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: data-sanitization
description: A Helm chart for Data Sanitization in Kubernetes
version: 0.2.3
appVersion: "0.2.0"
version: 0.2.4
appVersion: 0.2.1
2 changes: 1 addition & 1 deletion src/openapi_server/apis/job_api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_job_status_by_id(jobId: str) -> JobStatus:
)
LOGGER.info("Got Spark application data-sanitization-job-%s status", jobId)

jobStatus = api_response['status']['applicationState']
jobStatus = api_response.get('status', {}).get('applicationState', {'state': 'UNKNOWN'})
except ApiException as error:
LOGGER.error("Exception when getting Spark application "
"data-sanitization-job-%s: %s", jobId, error)
Expand Down

0 comments on commit 6fc567e

Please sign in to comment.