Skip to content

Commit

Permalink
Fix runtime error when authorization fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswilddev committed Sep 2, 2024
1 parent 5ea0264 commit 24426b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions laravel/src/SyncableModelHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -77,7 +77,7 @@ static function upsert(


if ($query->where('uuid', $uuid)->exists()) {
throw new UnauthorizedException();
throw new AuthorizationException();
} else {
return null;
}
Expand Down

0 comments on commit 24426b6

Please sign in to comment.