fix
This commit is contained in:
@@ -21,11 +21,11 @@ public class ResponseFilter : IActionFilter
|
||||
public void OnActionExecuted(ActionExecutedContext context)
|
||||
{
|
||||
if (context.Result == null)
|
||||
throw new NotSupportedException($"Response must be - empty");
|
||||
throw new NotSupportedException($"Response required");
|
||||
if (!(context.Result is ObjectResult result))
|
||||
throw new NotSupportedException($"Response must be an ObjectResult - {context.Result?.GetType().Name}");
|
||||
if (result.Value == null)
|
||||
throw new NotSupportedException($"Response must be an ObjectResult - empty");
|
||||
throw new NotSupportedException($"Response must be an ObjectResult with value");
|
||||
|
||||
if (result.Value is IResponseModel)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user