1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-07 02:52:50 -05:00

modelstate and exception handling for public apis

This commit is contained in:
Kyle Spearrin
2019-03-01 17:30:44 -05:00
parent e0d7da892e
commit 8d51700120
6 changed files with 158 additions and 30 deletions

View File

@ -5,7 +5,9 @@ namespace Bit.Core.Exceptions
{
public class BadRequestException : Exception
{
public BadRequestException(string message) : this(string.Empty, message) { }
public BadRequestException(string message)
: base(message)
{ }
public BadRequestException(string key, string errorMessage)
: base("The model state is invalid.")