Skip to content

Commit

Permalink
UHF-9024: Add stricter error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrsky committed Nov 8, 2023
1 parent e929039 commit c14ad8f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Drupal\paatokset_policymakers\Enum\PolicymakerRoutes;
use Drupal\path_alias\AliasManagerInterface;
use Drupal\search_api\Entity\Index;
use InvalidArgumentException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

/**
Expand Down Expand Up @@ -1491,7 +1492,7 @@ public function getMeetingTitle(NodeInterface $meeting): string {
*/
public function getMeetingAgenda(string $meetingId): ?array {
if (!$this->policymaker instanceof NodeInterface || !$this->policymakerId) {
return [];
throw new InvalidArgumentException("Missing policymaker");
}

$meeting = $this->getMeetingNode($meetingId);
Expand Down

0 comments on commit c14ad8f

Please sign in to comment.