Add conflict to nami Exception

This commit is contained in:
philipp lang 2022-04-28 23:52:12 +02:00
parent 1ebb229fbc
commit c604f082e2
1 changed files with 6 additions and 0 deletions

View File

@ -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(), [