From 2db99edcda19a3efa5eae9edd44982860c2af9b2 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Wed, 21 Jan 2026 22:05:16 +0100 Subject: [PATCH] Add constructor to BadRequestException for inner exceptions Added a new constructor to BadRequestException that accepts both a message and an inner exception, enabling improved exception chaining and more detailed error reporting. --- DigitalData.Core.Exceptions/BadRequestException.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DigitalData.Core.Exceptions/BadRequestException.cs b/DigitalData.Core.Exceptions/BadRequestException.cs index bd2ff27..22e6bd1 100644 --- a/DigitalData.Core.Exceptions/BadRequestException.cs +++ b/DigitalData.Core.Exceptions/BadRequestException.cs @@ -19,4 +19,13 @@ public class BadRequestException : Exception public BadRequestException(string? message) : base(message) { } + + /// + /// Initializes a new instance of the class with a specified error message and inner exception. + /// + /// The message that describes the error. + /// The exception that caused the current exception. + public BadRequestException(string? message, Exception? innerException) : base(message, innerException) + { + } }