Fix exapmples
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user