From 62e61c46d06b3157f7d5952b71e789d7a386521c Mon Sep 17 00:00:00 2001 From: Nathan Andersen Date: Mon, 27 Mar 2023 13:45:38 -0400 Subject: [PATCH] Add InvalidEntryException --- src/Exception/InvalidEntryException.php | 59 +++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/Exception/InvalidEntryException.php diff --git a/src/Exception/InvalidEntryException.php b/src/Exception/InvalidEntryException.php new file mode 100644 index 00000000..a54cf8ee --- /dev/null +++ b/src/Exception/InvalidEntryException.php @@ -0,0 +1,59 @@ +getResponse()->getBody()); + if ($previousBody?->details) { + $this->errors = $previousBody->details->errors; + } + } + + /** + * Get error details. + * + * @return array + */ + public function getErrors(): array + { + return $this->errors; + } + +}