diff --git a/laravel/src/SyncableModelHelper.php b/laravel/src/SyncableModelHelper.php index cfacb74..645d42f 100644 --- a/laravel/src/SyncableModelHelper.php +++ b/laravel/src/SyncableModelHelper.php @@ -3,7 +3,7 @@ namespace JamesWildDev\ReactNativeAppHelpers; use Illuminate\Database\Eloquent\ModelNotFoundException; -use Illuminate\Validation\UnauthorizedException; +use Illuminate\Auth\Access\AuthorizationException; /** * Helpers for working with syncable models. @@ -77,7 +77,7 @@ static function upsert( if ($query->where('uuid', $uuid)->exists()) { - throw new UnauthorizedException(); + throw new AuthorizationException(); } else { return null; }