moved seriesmodule to restmodule

This commit is contained in:
kay.one 2013-04-20 15:14:41 -07:00
commit d85b825e06
11 changed files with 142 additions and 43 deletions

View file

@ -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);