Skip to content

Commit 2dceb51

Browse files
committed
Fix warning related to unused async
1 parent 2a5fbb8 commit 2dceb51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Presentation/Nop.Web.Framework/Infrastructure/Extensions/ApplicationBuilderExtensions.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static void UsePageNotFound(this IApplicationBuilder application)
121121
/// <param name="application">Builder for configuring an application's request pipeline</param>
122122
public static void UseBadRequestResult(this IApplicationBuilder application)
123123
{
124-
application.UseStatusCodePages(async context =>
124+
application.UseStatusCodePages(context =>
125125
{
126126
//handle 404 (Bad request)
127127
if (context.HttpContext.Response.StatusCode == StatusCodes.Status400BadRequest)
@@ -130,6 +130,8 @@ public static void UseBadRequestResult(this IApplicationBuilder application)
130130
var workContext = EngineContext.Current.Resolve<IWorkContext>();
131131
logger.Error("Error 400. Bad request", null, customer: workContext.CurrentCustomer);
132132
}
133+
134+
return System.Threading.Tasks.Task.CompletedTask;
133135
});
134136
}
135137

0 commit comments

Comments
 (0)