Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add nil check in databricks plugin #332

Merged
merged 3 commits into from
May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions go/tasks/plugins/webapi/databricks/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest weba
if err != nil {
return nil, err
}
if data == nil || data["state"] == nil {
return nil, errors.Errorf("CorruptedPluginState", "can't get the job state")
}
jobState := data["state"].(map[string]interface{})
message := fmt.Sprintf("%s", jobState["state_message"])
jobID := fmt.Sprintf("%.0f", data["job_id"])
Expand Down