diff --git a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/AuthenticationEventResponseHandler.cs b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/AuthenticationEventResponseHandler.cs index fd810afb63c13..664f34b5274d9 100644 --- a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/AuthenticationEventResponseHandler.cs +++ b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/AuthenticationEventResponseHandler.cs @@ -57,7 +57,7 @@ public Task SetValueAsync(object result, CancellationToken cancellationToken) { if (result == null) { - throw new ValidationException(AuthenticationEventResource.Ex_Invalid_Return); + throw new ArgumentNullException("AuthenticationEventResponseHandler", AuthenticationEventResource.Ex_Invalid_Return); } if (result is AuthenticationEventResponse action) diff --git a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/Payloads/TokenIssuanceStart/NullResponse.json b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/Payloads/TokenIssuanceStart/NullResponse.json index bfa3fc136c4a6..20d91a5f4b7cf 100644 --- a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/Payloads/TokenIssuanceStart/NullResponse.json +++ b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/Payloads/TokenIssuanceStart/NullResponse.json @@ -1,3 +1,3 @@ { - "errors": [ "Return type is invalid, please return either an AuthEventResponse, HttpResponse, HttpResponseMessage or string in your function return." ] + "errors": [ "Return type is invalid, please return either an AuthEventResponse, HttpResponse, HttpResponseMessage or string in your function return. (Parameter 'AuthenticationEventResponseHandler')" ] }