mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 02:52:50 -05:00
Revert filescoped (#2227)
* Revert "Add git blame entry (#2226)" This reverts commit239286737d
. * Revert "Turn on file scoped namespaces (#2225)" This reverts commit34fb4cca2a
.
This commit is contained in:
@ -1,30 +1,31 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
|
||||
namespace Bit.Core.Exceptions;
|
||||
|
||||
public class BadRequestException : Exception
|
||||
namespace Bit.Core.Exceptions
|
||||
{
|
||||
public BadRequestException(string message)
|
||||
: base(message)
|
||||
{ }
|
||||
|
||||
public BadRequestException(string key, string errorMessage)
|
||||
: base("The model state is invalid.")
|
||||
public class BadRequestException : Exception
|
||||
{
|
||||
ModelState = new ModelStateDictionary();
|
||||
ModelState.AddModelError(key, errorMessage);
|
||||
}
|
||||
public BadRequestException(string message)
|
||||
: base(message)
|
||||
{ }
|
||||
|
||||
public BadRequestException(ModelStateDictionary modelState)
|
||||
: base("The model state is invalid.")
|
||||
{
|
||||
if (modelState.IsValid || modelState.ErrorCount == 0)
|
||||
public BadRequestException(string key, string errorMessage)
|
||||
: base("The model state is invalid.")
|
||||
{
|
||||
return;
|
||||
ModelState = new ModelStateDictionary();
|
||||
ModelState.AddModelError(key, errorMessage);
|
||||
}
|
||||
|
||||
ModelState = modelState;
|
||||
}
|
||||
public BadRequestException(ModelStateDictionary modelState)
|
||||
: base("The model state is invalid.")
|
||||
{
|
||||
if (modelState.IsValid || modelState.ErrorCount == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public ModelStateDictionary ModelState { get; set; }
|
||||
ModelState = modelState;
|
||||
}
|
||||
|
||||
public ModelStateDictionary ModelState { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
namespace Bit.Core.Exceptions;
|
||||
|
||||
public class GatewayException : Exception
|
||||
namespace Bit.Core.Exceptions
|
||||
{
|
||||
public GatewayException(string message, Exception innerException = null)
|
||||
: base(message, innerException)
|
||||
{ }
|
||||
public class GatewayException : Exception
|
||||
{
|
||||
public GatewayException(string message, Exception innerException = null)
|
||||
: base(message, innerException)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
namespace Bit.Core.Exceptions;
|
||||
|
||||
public class InvalidEmailException : Exception
|
||||
namespace Bit.Core.Exceptions
|
||||
{
|
||||
public InvalidEmailException()
|
||||
: base("Invalid email.")
|
||||
public class InvalidEmailException : Exception
|
||||
{
|
||||
public InvalidEmailException()
|
||||
: base("Invalid email.")
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
namespace Bit.Core.Exceptions;
|
||||
|
||||
public class InvalidGatewayCustomerIdException : Exception
|
||||
namespace Bit.Core.Exceptions
|
||||
{
|
||||
public InvalidGatewayCustomerIdException()
|
||||
: base("Invalid gateway customerId.")
|
||||
public class InvalidGatewayCustomerIdException : Exception
|
||||
{
|
||||
public InvalidGatewayCustomerIdException()
|
||||
: base("Invalid gateway customerId.")
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
namespace Bit.Core.Exceptions;
|
||||
|
||||
public class NotFoundException : Exception { }
|
||||
namespace Bit.Core.Exceptions
|
||||
{
|
||||
public class NotFoundException : Exception { }
|
||||
}
|
||||
|
Reference in New Issue
Block a user