-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e88fcc
commit babd7b3
Showing
24 changed files
with
230 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...es/TenantIdentity/Features/DomainFeatures/Tenants/Application/Commands/AddUserToTenant.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ntIdentity/Features/DomainFeatures/Tenants/Application/Commands/UpdateUserRoleInTenant.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
...nantIdentity/Features/DomainFeatures/Tenants/Domain/Exceptions/MemberNotFoundException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
namespace Modules.TenantIdentity.Features.DomainFeatures.Tenants.Domain.Exceptions | ||
using Microsoft.AspNetCore.Http; | ||
using Shared.Features.Errors.Exceptions; | ||
|
||
namespace Modules.TenantIdentity.Features.DomainFeatures.Tenants.Domain.Exceptions | ||
{ | ||
public class MemberNotFoundException : Exception | ||
public class MemberNotFoundException : DomainException | ||
{ | ||
public MemberNotFoundException() : base("Member not found", StatusCodes.Status404NotFound) | ||
{ | ||
} | ||
} | ||
} |
5 changes: 3 additions & 2 deletions
5
...tIdentity/Features/DomainFeatures/Tenants/Domain/Exceptions/TabsAlreadyClosedException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...xceptions/UserIsAlreadyMemberException.cs → .../Exceptions/UserAlreadyMemberException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
namespace Modules.TenantIdentity.Features.DomainFeatures.Tenants.Domain.Exceptions | ||
{ | ||
public class UserIsAlreadyMemberException : Exception | ||
public class UserAlreadyMemberException : Exception | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
Source/Shared/Features/Domain/Exceptions/DomainException.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
Source/Shared/Kernel/Errors/Errors.cs → Source/Shared/Features/Errors/Error.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
using Shared.Kernel.Errors.Exceptions; | ||
using Shared.Features.Errors.Exceptions; | ||
|
||
namespace Shared.Kernel.Errors | ||
namespace Shared.Features.Errors | ||
{ | ||
public static class Errors | ||
public static class Error | ||
{ | ||
public static NotFoundException NotFound(string entityName, Guid id) => new NotFoundException(entityName, id); | ||
public static NotFoundException NotFound(string entityName, string id) => new NotFoundException(entityName, id); | ||
public static DomainException DomainException(string message, int statusCode) => new DomainException(message, statusCode); | ||
public static UnAuthorizedException UnAuthorized = new UnAuthorizedException(); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Source/Shared/Features/Errors/Exceptions/DomainException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Shared.Features.Errors.Exceptions | ||
{ | ||
public class DomainException : Exception | ||
{ | ||
public int StatusCode { get; private set; } | ||
|
||
public DomainException(string message, int statusCode) : base(message) | ||
{ | ||
StatusCode = statusCode; | ||
} | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
...xceptions/InvalidEntityDeleteException.cs → ...xceptions/InvalidEntityDeleteException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.