Skip to content

Commit 94759c7

Browse files
jprangenbergdeLKaemmerling
authored andcommitted
Handle null errors in Action model instantiation
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.
1 parent 89cd083 commit 94759c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/Actions/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,6 @@ public static function parse($input)
148148
return;
149149
}
150150

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

0 commit comments

Comments
 (0)