Removed unnecessary using directives in `UpdateEmailTemplateCommandHandler.cs`. Added a new `BadRequestException` class in `BadRequestException.cs` to handle bad request scenarios with customizable error messages.
23 lines
681 B
C#
23 lines
681 B
C#
namespace EnvelopeGenerator.Application.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Represents an exception that is thrown when a bad request is encountered.
|
|
/// </summary>
|
|
public class BadRequestException : Exception
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="BadRequestException"/> class.
|
|
/// </summary>
|
|
public BadRequestException()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="BadRequestException"/> class with a specified error message.
|
|
/// </summary>
|
|
/// <param name="message">The message that describes the error.</param>
|
|
public BadRequestException(string? message) : base(message)
|
|
{
|
|
}
|
|
}
|