-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathOAuthException.cs
More file actions
154 lines (139 loc) · 6.68 KB
/
OAuthException.cs
File metadata and controls
154 lines (139 loc) · 6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
using System;
namespace Contentstack.Management.Core.Exceptions
{
/// <summary>
/// Base exception class for OAuth-related errors in the Contentstack Management SDK.
/// </summary>
public class OAuthException : ContentstackException
{
/// <summary>
/// Initializes a new instance of the OAuthException class.
/// </summary>
public OAuthException() : base("OAuth operation failed.")
{
}
/// <summary>
/// Initializes a new instance of the OAuthException class with a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public OAuthException(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the OAuthException class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
public OAuthException(string message, Exception innerException) : base(message, innerException)
{
}
}
/// <summary>
/// Exception thrown when OAuth configuration is invalid or missing required parameters.
/// </summary>
public class OAuthConfigurationException : OAuthException
{
/// <summary>
/// Initializes a new instance of the OAuthConfigurationException class.
/// </summary>
public OAuthConfigurationException() : base("OAuth configuration is invalid.")
{
}
/// <summary>
/// Initializes a new instance of the OAuthConfigurationException class with a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public OAuthConfigurationException(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the OAuthConfigurationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
public OAuthConfigurationException(string message, Exception innerException) : base(message, innerException)
{
}
}
/// <summary>
/// Exception thrown when OAuth token operations fail.
/// </summary>
public class OAuthTokenException : OAuthException
{
/// <summary>
/// Initializes a new instance of the OAuthTokenException class.
/// </summary>
public OAuthTokenException() : base("OAuth token operation failed.")
{
}
/// <summary>
/// Initializes a new instance of the OAuthTokenException class with a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public OAuthTokenException(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the OAuthTokenException class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
public OAuthTokenException(string message, Exception innerException) : base(message, innerException)
{
}
}
/// <summary>
/// Exception thrown when OAuth authorization fails.
/// </summary>
public class OAuthAuthorizationException : OAuthException
{
/// <summary>
/// Initializes a new instance of the OAuthAuthorizationException class.
/// </summary>
public OAuthAuthorizationException() : base("OAuth authorization failed.")
{
}
/// <summary>
/// Initializes a new instance of the OAuthAuthorizationException class with a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public OAuthAuthorizationException(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the OAuthAuthorizationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
public OAuthAuthorizationException(string message, Exception innerException) : base(message, innerException)
{
}
}
/// <summary>
/// Exception thrown when OAuth token refresh fails.
/// </summary>
public class OAuthTokenRefreshException : OAuthTokenException
{
/// <summary>
/// Initializes a new instance of the OAuthTokenRefreshException class.
/// </summary>
public OAuthTokenRefreshException() : base("OAuth token refresh failed.")
{
}
/// <summary>
/// Initializes a new instance of the OAuthTokenRefreshException class with a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public OAuthTokenRefreshException(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the OAuthTokenRefreshException class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
public OAuthTokenRefreshException(string message, Exception innerException) : base(message, innerException)
{
}
}
}