Skip to content

Commit

Permalink
Use named arguments for previous exception
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Jan 6, 2025
1 parent 04edf87 commit ebd0c13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ public function call(MessageBagInterface $messages, array $options = []): Respon

$this->logger->debug($message, $content);

throw new InvalidArgumentException('' === $message ? 'Invalid request to model or platform' : $message, 0, $e);
throw new InvalidArgumentException('' === $message ? 'Invalid request to model or platform' : $message, previous: $e);
} catch (HttpExceptionInterface $e) {
throw new RuntimeException('Failed to request model', 0, $e);
throw new RuntimeException('Failed to request model', previous: $e);
}

$output = new Output($llm, $response, $messages, $options);
Expand Down

0 comments on commit ebd0c13

Please sign in to comment.