Skip to content

Commit

Permalink
fix: fixing use of incorrect exception in rpc validate
Browse files Browse the repository at this point in the history
BREAKING CHANGE: ServerRpc now throws InvalidOperationException if authority is required
  • Loading branch information
James-Frowen committed Aug 1, 2022
1 parent 3465258 commit 948c3a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Mirage/Runtime/RemoteCalls/ServerRpcSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static void Validate(NetworkBehaviour behaviour, int index, bool require
// if authority is required, then client must have authority to send
if (requireAuthority && !behaviour.HasAuthority)
{
throw new UnauthorizedAccessException($"Trying to send ServerRpc for object without authority. {rpc}");
throw new InvalidOperationException($"Trying to send ServerRpc for object without authority. {rpc}");
}

if (client.Player == null)
Expand Down

0 comments on commit 948c3a4

Please sign in to comment.