Skip to content

Commit

Permalink
Add new implementation of Error class for a Conflict error (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelkenlay authored and Choc13 committed Aug 23, 2019
1 parent 3fc8e84 commit d85a77b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,8 @@ Extends `Error` to indicate that an entity could not be found.

### `UnauthorizedError`

Extends `Error` to indicate that the action being performed is not authorized.
Extends `Error` to indicate that the action being performed is not authorized.

### `ConflictError`

Extends `Error` to indicate the action cannot be completed due to the existence of a conflicting entity.
22 changes: 22 additions & 0 deletions src/Winton.DomainModelling.Abstractions/ConflictError.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) Winton. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

namespace Winton.DomainModelling
{
/// <inheritdoc />
/// <summary>
/// An error indicating that a conflicting entity exists.
/// </summary>
public class ConflictError : Error
{
/// <summary>
/// Initializes a new instance of the <see cref="ConflictError" /> class.
/// </summary>
/// <param name="detail">The detail that describes the error.</param>
/// <returns>A new instance of <see cref="ConflictError" />.</returns>
public ConflictError(string detail)
: base("Conflict", detail)
{
}
}
}

0 comments on commit d85a77b

Please sign in to comment.