Skip to content

Commit 15ecfdf

Browse files
committed
4992: Added error code
1 parent 230ae58 commit 15ecfdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/InteractiveSlide/InstantBook.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function performAction(UserInterface $user, Slide $slide, InteractionSlid
8888
return match ($interactionRequest->action) {
8989
self::ACTION_GET_QUICK_BOOK_OPTIONS => $this->getQuickBookOptions($slide, $interactionRequest),
9090
self::ACTION_QUICK_BOOK => $this->quickBook($slide, $interactionRequest),
91-
default => throw new InteractiveSlideException('Action not allowed'),
91+
default => throw new InteractiveSlideException('Action not allowed', 400),
9292
};
9393
}
9494

@@ -103,7 +103,7 @@ private function authenticate(array $configuration): array
103103
$password = $this->keyValueService->getValue($configuration['password']);
104104

105105
if (4 !== count(array_filter([$tenantId, $clientId, $username, $password]))) {
106-
throw new InteractiveSlideException('tenantId, clientId, username, password must all be set.');
106+
throw new InteractiveSlideException('tenantId, clientId, username, password must all be set.', 400);
107107
}
108108

109109
$url = self::LOGIN_ENDPOINT.$tenantId.self::OAUTH_PATH;
@@ -129,7 +129,7 @@ private function getToken(Tenant $tenant, InteractiveSlide $interactive): string
129129
$configuration = $interactive->getConfiguration();
130130

131131
if (null === $configuration) {
132-
throw new InteractiveSlideException('InteractiveSlide has no configuration');
132+
throw new InteractiveSlideException('InteractiveSlide has no configuration', 400);
133133
}
134134

135135
return $this->interactiveSlideCache->get(

0 commit comments

Comments
 (0)