-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decode known status code for local execution
- Loading branch information
1 parent
59da577
commit 124155f
Showing
9 changed files
with
108 additions
and
19 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
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
12 changes: 12 additions & 0 deletions
12
src/CQRS/LeanCode.CQRS.AspNetCore/Local/UnauthenticatedCQRSRequestException.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 LeanCode.CQRS.AspNetCore.Local; | ||
|
||
public class UnauthenticatedCQRSRequestException : Exception | ||
{ | ||
public Type ObjectType { get; } | ||
|
||
public UnauthenticatedCQRSRequestException(Type objectType) | ||
: base($"The request {objectType.FullName} was not authenticated.") | ||
{ | ||
ObjectType = objectType; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/CQRS/LeanCode.CQRS.AspNetCore/Local/UnauthorizedCQRSRequestException.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 LeanCode.CQRS.AspNetCore.Local; | ||
|
||
public class UnauthorizedCQRSRequestException : Exception | ||
{ | ||
public Type ObjectType { get; } | ||
|
||
public UnauthorizedCQRSRequestException(Type objectType) | ||
: base($"The request {objectType.FullName} was not authorized.") | ||
{ | ||
ObjectType = objectType; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/CQRS/LeanCode.CQRS.AspNetCore/Local/UnknownStatusCodeException.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,14 @@ | ||
namespace LeanCode.CQRS.AspNetCore.Local; | ||
|
||
public class UnknownStatusCodeException : Exception | ||
{ | ||
public int StatusCode { get; } | ||
public Type ObjectType { get; } | ||
|
||
public UnknownStatusCodeException(int statusCode, Type objectType) | ||
: base($"Unknown status code {statusCode} for request {objectType.FullName}.") | ||
{ | ||
StatusCode = statusCode; | ||
ObjectType = objectType; | ||
} | ||
} |
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