0
0
mirror of https://github.com/Shchoholiev/shopping-assistant-api.git synced 2025-06-29 18:21:11 +00:00
shopping-assistant-api/ShoppingAssistantApi.Application/Exceptions/UnAuthorizedException.cs

12 lines
383 B
C#

using MongoDB.Bson;
using ShoppingAssistantApi.Domain.Common;
namespace ShoppingAssistantApi.Application.Exceptions;
public class UnAuthorizedException<TEntity> : Exception where TEntity : EntityBase
{
public UnAuthorizedException() { }
public UnAuthorizedException(ObjectId id) : base(String.Format($"Access to object {id} of type {typeof(TEntity).Name} denied.")) { }
}