mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
moved seriesmodule to restmodule
This commit is contained in:
parent
4afec69c79
commit
d85b825e06
11 changed files with 142 additions and 43 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using FluentValidation;
|
||||
using NLog;
|
||||
using Nancy;
|
||||
using NzbDrone.Api.Extensions;
|
||||
|
@ -25,6 +26,17 @@ namespace NzbDrone.Api.ErrorManagement
|
|||
return apiException.ToErrorResponse();
|
||||
}
|
||||
|
||||
var validationException = exception as ValidationException;
|
||||
|
||||
if (validationException != null)
|
||||
{
|
||||
_logger.Warn("Invalid request {0}", validationException.Message);
|
||||
|
||||
|
||||
return validationException.Errors.AsResponse(HttpStatusCode.BadRequest);
|
||||
|
||||
}
|
||||
|
||||
_logger.ErrorException("Unexpected error", exception);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue