Add conflict to nami Exception
This commit is contained in:
parent
1ebb229fbc
commit
c604f082e2
|
@ -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(), [
|
||||
|
|
Loading…
Reference in New Issue