mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Prevent adding a root folder that is the same as drone factory
This commit is contained in:
parent
e3916d5fc8
commit
485f05d4b9
6 changed files with 33 additions and 11 deletions
|
@ -1,8 +1,11 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using FluentValidation;
|
||||
using NLog;
|
||||
using Nancy;
|
||||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Common.Exceptions;
|
||||
using HttpStatusCode = Nancy.HttpStatusCode;
|
||||
|
||||
namespace NzbDrone.Api.ErrorManagement
|
||||
{
|
||||
|
@ -31,14 +34,11 @@ namespace NzbDrone.Api.ErrorManagement
|
|||
{
|
||||
_logger.Warn("Invalid request {0}", validationException.Message);
|
||||
|
||||
|
||||
return validationException.Errors.AsResponse(HttpStatusCode.BadRequest);
|
||||
|
||||
}
|
||||
|
||||
_logger.FatalException("Request Failed", exception);
|
||||
|
||||
|
||||
return new ErrorModel()
|
||||
{
|
||||
Message = exception.Message,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue