Skip to content

Commit

Permalink
Handle null errors in Action model instantiation
Browse files Browse the repository at this point in the history
Previously, the `error` property could be undefined, leading to potential issues during object creation. This update ensures that `error` defaults to `null` if not provided, enhancing the robustness of the Action model instantiation process.
  • Loading branch information
jprangenbergde authored and LKaemmerling committed Sep 20, 2024
1 parent 89cd083 commit 94759c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Actions/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ public static function parse($input)
return;
}

return new self($input->id, $input->command, $input->progress, $input->status, $input->started, $input->finished, $input->resources, $input->error);
return new self($input->id, $input->command, $input->progress, $input->status, $input->started, $input->finished, $input->resources, $input->error ?? null);
}
}

0 comments on commit 94759c7

Please sign in to comment.