Skip to content

Commit

Permalink
IdentityException
Browse files Browse the repository at this point in the history
  • Loading branch information
Utar94 committed Dec 15, 2024
1 parent 6e278bc commit a768a36
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions lib/Logitar.Identity.Core/IdentityException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Logitar.Identity.Core;

/// <summary>
/// The base class of Identity exceptions.
/// </summary>
public abstract class IdentityException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="IdentityException"/> class.
/// </summary>
/// <param name="message">The exception message.</param>
/// <param name="innerException">The inner exception.</param>
protected IdentityException(string message, Exception? innerException = null) : base(message, innerException)
{
}
}
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/InvalidCredentialsException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <summary>
/// The exception raised when credential validation failed.
/// </summary>
public class InvalidCredentialsException : Exception
public class InvalidCredentialsException : IdentityException
{
/// <summary>
/// A generic error message for this exception.
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/TenantMismatchException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <summary>
/// The exception raised when an association is made between two entities in different tenants.
/// </summary>
public class TenantMismatchException : Exception
public class TenantMismatchException : IdentityException
{
/// <summary>
/// A generic error message for this exception.
Expand Down

0 comments on commit a768a36

Please sign in to comment.