diff --git a/src/core/DigitalData.MessagingService.Domain/Exceptions/BadRequestException.cs b/src/core/DigitalData.MessagingService.Domain/Exceptions/BadRequestException.cs new file mode 100644 index 0000000..aa0bfe9 --- /dev/null +++ b/src/core/DigitalData.MessagingService.Domain/Exceptions/BadRequestException.cs @@ -0,0 +1,21 @@ +namespace DigitalData.MessagingService.Domain.Exceptions +{ + /// + /// Exception thrown when a requested entity is not found. + /// + 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) + { + } + } +} \ No newline at end of file