Skip to content

Commit

Permalink
Merge pull request #147 from packbackbooks/mgmt-119-previous-exception
Browse files Browse the repository at this point in the history
Pass the previous exception
  • Loading branch information
dbhynds authored Jul 22, 2024
2 parents 199510d + 8def62e commit 054ab99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LtiMessageLaunch.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ private function getPublicKey(): Key
try {
$response = $this->serviceConnector->makeRequest($request);
} catch (TransferException $e) {
throw new LtiException(static::ERR_NO_PUBLIC_KEY);
throw new LtiException(static::ERR_NO_PUBLIC_KEY, previous: $e);
}
$publicKeySet = $this->serviceConnector->getResponseBody($response);

Expand Down Expand Up @@ -442,7 +442,7 @@ protected function validateJwtSignature(): self
JWT::decode($this->request['id_token'], $public_key, $headers);
} catch (ExpiredException $e) {
// Error validating signature.
throw new LtiException(static::ERR_INVALID_SIGNATURE);
throw new LtiException(static::ERR_INVALID_SIGNATURE, previous: $e);
}

return $this;
Expand Down

0 comments on commit 054ab99

Please sign in to comment.