diff --git a/Userland/Utilities/lsof.cpp b/Userland/Utilities/lsof.cpp index 8690ed7018..2646173dac 100644 --- a/Userland/Utilities/lsof.cpp +++ b/Userland/Utilities/lsof.cpp @@ -70,7 +70,12 @@ static Vector get_open_files_by_pid(pid_t pid) } auto data = file.value()->read_all(); - auto json = JsonValue::from_string(data).release_value_but_fixme_should_propagate_errors(); + auto json_or_error = JsonValue::from_string(data); + if (json_or_error.is_error()) { + outln("lsof: {}", json_or_error.error()); + return Vector(); + } + auto json = json_or_error.release_value(); Vector files; json.as_array().for_each([pid, &files](const JsonValue& object) {