Special case where the user is not authorized

This commit is contained in:
Elitsa Marinovska
2021-01-13 16:17:39 +01:00
parent 7c5e045868
commit ded3a06170
2 changed files with 16 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using System.Net;
using System.Threading.Tasks;
@@ -60,7 +60,7 @@ namespace Umbraco.Web.BackOffice.ModelBinders
if (parts.Length < 2)
{
bindingContext.HttpContext.SetReasonPhrase( "The request was not formatted correctly the file name's must be underscore delimited");
throw new HttpResponseException(HttpStatusCode.BadRequest);
return null;
}
var propAlias = parts[1];