using System.Net; using GerstITS.Data; using GerstITS.Web.Api.ExceptionHandling; namespace GerstITS.Examples.Api.ExceptionHandling; public class EntityNotFoundExceptionTransformation : ExceptionTransformationBase { #region Methods protected override ExceptionTransformationInfo CreateExceptionTransformationInfo(EntityNotFoundException exception, string ticketId) { return new ExceptionTransformationInfo { StatusCode = HttpStatusCode.NotFound, ReasonPhrase = "Enitity nicht gefunden", Details = exception.Message }; } #endregion }