Fix exapmples

This commit is contained in:
2023-12-18 12:10:34 +01:00
parent e390644d35
commit 3d034f3d4d
18 changed files with 51 additions and 56 deletions

View File

@@ -6,13 +6,17 @@ namespace GerstITS.Examples.Api.ExceptionHandling;
public class EntityNotFoundExceptionTransformation : ExceptionTransformationBase<EntityNotFoundException>
{
#region Methods
protected override ExceptionTransformationInfo CreateExceptionTransformationInfo(EntityNotFoundException exception, string ticketId)
{
return new ExceptionTransformationInfo
{
StatusCode = HttpStatusCode.NotFound,
ReasonPhrase = "Enitity nicht gefunden",
Details = exception.Message
};
}
{
StatusCode = HttpStatusCode.NotFound,
ReasonPhrase = "Enitity nicht gefunden",
Details = exception.Message
};
}
#endregion
}

View File

@@ -11,11 +11,11 @@ internal sealed class ValidationExceptionTransformation : ExceptionTransformatio
protected override ExceptionTransformationInfo CreateExceptionTransformationInfo(ValidationException exception, string ticketId)
{
return new ExceptionTransformationInfo
{
StatusCode = HttpStatusCode.BadRequest,
ReasonPhrase = "Validierungsfehler",
Details = exception.Message
};
{
StatusCode = HttpStatusCode.BadRequest,
ReasonPhrase = "Validierungsfehler",
Details = exception.Message
};
}
#endregion