diff --git a/src/NamiException.php b/src/NamiException.php index 30b44a2..21276a9 100644 --- a/src/NamiException.php +++ b/src/NamiException.php @@ -2,6 +2,7 @@ namespace Zoomyboy\LaravelNami; +use Illuminate\Console\Command; use Illuminate\Support\Str; use Illuminate\Validation\ValidationException; @@ -48,4 +49,11 @@ class NamiException extends \Exception { throw ValidationException::withMessages(['id' => 'Unbekannter Fehler']); } + + public function outputToConsole(Command $command): void + { + $command->info("Request URL: ".$this->requestUrl); + $command->info("response: ".json_encode($this->response)); + $command->info($this->getMessage()); + } }