// // Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License. // using System.Net; namespace Astral.Core.Exceptions; /// /// Service exception to be fed back into the response. /// public class ServiceException : Exception { /// /// Initializes a new instance of the class. /// /// Error code to provide. /// Error message to provide. /// The http status code to provide. protected ServiceException(string errorCode, string errorMessage, HttpStatusCode httpStatusCode) : base(errorMessage) { ErrorCode = errorCode; ErrorMessage = errorMessage; HttpStatusCode = httpStatusCode; } /// /// Standard error code. /// public string ErrorCode { get; } /// /// Error message. /// public string ErrorMessage { get; } /// /// Http Status Code. /// public HttpStatusCode HttpStatusCode { get; } }