forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added response validation exception type
- Loading branch information
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...Jobs.Extensions.AuthenticationEvents/src/Common/Exceptions/ResponseValidationException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
|
||
namespace Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents | ||
{ | ||
/// <summary> | ||
/// Exception class for response validations | ||
/// </summary> | ||
public class ResponseValidationException : Exception | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ResponseValidationException"/> class. | ||
/// </summary> | ||
/// <param name="message"></param> | ||
public ResponseValidationException(string message) | ||
: base(message) { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ResponseValidationException"/> class. | ||
/// </summary> | ||
/// <param name="message"></param> | ||
/// <param name="innerException"></param> | ||
public ResponseValidationException(string message, Exception innerException) | ||
: base(message, innerException) { } | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...bJobs.Extensions.AuthenticationEvents/tests/Payloads/TokenIssuanceStart/NullResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"errors": [ "Return type is invalid, please return either an AuthEventResponse, HttpResponse, HttpResponseMessage or string in your function return. (Parameter 'AuthenticationEventResponseHandler')" ] | ||
"errors": [ "Return type is invalid, please return either an AuthEventResponse, HttpResponse, HttpResponseMessage or string in your function return." ] | ||
} |