feat(domain): add BadRequestException for invalid request errors
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
namespace DigitalData.MessagingService.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Exception thrown when a requested entity is not found.
|
||||
/// </summary>
|
||||
public class BadRequestException : Exception
|
||||
{
|
||||
public BadRequestException(string entityName, object key) : base($"{entityName} with key '{key}' was not found.")
|
||||
{
|
||||
}
|
||||
|
||||
public BadRequestException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public BadRequestException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user