Skip to content

Commit 56aa557

Browse files
committed
使用ApiReturnNotSupportedException覆盖拼写错误的ApiReturnNotSupportedExteption
1 parent 3016b9f commit 56aa557

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace WebApiClientCore.Exceptions
2+
{
3+
/// <summary>
4+
/// <inheritdoc/>
5+
/// </summary>
6+
public class ApiReturnNotSupportedException : ApiReturnNotSupportedExteption
7+
{
8+
/// <summary>
9+
/// <inheritdoc/>
10+
/// </summary>
11+
/// <param name="context"></param>
12+
public ApiReturnNotSupportedException(ApiResponseContext context)
13+
: base(context)
14+
{
15+
}
16+
}
17+
}

WebApiClientCore/Exceptions/ApiReturnNotSupportedExteption.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
using System;
2+
using System.ComponentModel;
23
using System.Net;
34

45
namespace WebApiClientCore.Exceptions
56
{
67
/// <summary>
78
/// 表示接口不支持处理响应消息的异常
89
/// </summary>
10+
[EditorBrowsable(EditorBrowsableState.Never)]
911
public class ApiReturnNotSupportedExteption : ApiException, IStatusCodeException
1012
{
1113
/// <summary>

WebApiClientCore/Implementations/DefaultApiActionInvoker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private static async Task<TResult> InvokeAsync(ApiRequestContext request)
103103
ExceptionDispatchInfo.Capture(response.Exception).Throw();
104104
}
105105

106-
throw new ApiReturnNotSupportedExteption(response);
106+
throw new ApiReturnNotSupportedException(response);
107107
#nullable enable
108108
}
109109

0 commit comments

Comments
 (0)