diff --git a/app/Domains/Contact/ManageAvatar/Services/UpdatePhotoAsAvatar.php b/app/Domains/Contact/ManageAvatar/Services/UpdatePhotoAsAvatar.php index 3ed1fd09e47..4e4f0767247 100644 --- a/app/Domains/Contact/ManageAvatar/Services/UpdatePhotoAsAvatar.php +++ b/app/Domains/Contact/ManageAvatar/Services/UpdatePhotoAsAvatar.php @@ -71,6 +71,10 @@ private function deleteCurrentAvatar(): void { if ($this->contact->file) { $this->contact->file->delete(); + } else { + return [ + 'Error' => 'Contact file not found'; + ]; } }