update contact recode and clean up

This commit is contained in:
hazim
2019-03-07 16:10:10 +08:00
parent 46fe8430ef
commit 6e21b42ef9
2 changed files with 8 additions and 4 deletions
@@ -4,6 +4,7 @@ namespace App\Modules\ControllerLogic\Contacts;
use App\Classes\Constants;
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
use App\Classes\Modules\Contacts\Exceptions\CannotCreateContactException;
use App\Classes\Modules\Contacts\Services\CreatesContact;
use Illuminate\Http\Request;
@@ -30,8 +31,8 @@ class CreateContactLogic
return $this->createContact->execute($object, $type, $referenceId);
}
catch (){
catch (CannotCreateContactException $exception){
throw new InternalServerErrorException("Failed to create contact because {$exception->getMessage()}");
}
}