diff --git a/src/Results/SettledResult.php b/src/Results/SettledResult.php index d7778d2..1999da2 100644 --- a/src/Results/SettledResult.php +++ b/src/Results/SettledResult.php @@ -99,7 +99,7 @@ public function toResponse($request) * * @throws Exception */ - public function throw(?int $numberOfBacktraces) + public function throw(?int $numberOfBacktraces = null) { if (!$this->isError()) { return $this; @@ -107,7 +107,7 @@ public function throw(?int $numberOfBacktraces) throw new LambdaExecutionException(sprintf('Lambda Execution Exception for %s: "%s".', ...[ get_class($this->function), - $this->errorAsString($numberOfBacktraces) + $this->errorAsString($numberOfBacktraces ?? 2) ])); }