diff --git a/src/NamiException.php b/src/NamiException.php index 740469c..44d19f3 100644 --- a/src/NamiException.php +++ b/src/NamiException.php @@ -3,6 +3,7 @@ namespace Zoomyboy\LaravelNami; use Illuminate\Console\Command; +use Illuminate\Support\Str; use Illuminate\Validation\ValidationException; class NamiException extends \Exception @@ -38,6 +39,11 @@ class NamiException extends \Exception return $this; } + public function isConflict(): bool + { + return Str::contains(data_get($this->response, 'message'), 'Der Datensatz wurde zwischenzeitlich verändert'); + } + public function report(): void { \Log::error($this->getMessage(), [