Skip to content

Commit 7da16f7

Browse files
author
Andrew Omondi
committed
cleanup a bunch of unused constants
1 parent c78b39d commit 7da16f7

File tree

1 file changed

+11
-65
lines changed

1 file changed

+11
-65
lines changed

src/Microsoft.Graph.Core/Exceptions/ErrorConstants.cs

Lines changed: 11 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -8,84 +8,30 @@ internal static class ErrorConstants
88
{
99
internal static class Codes
1010
{
11-
internal static string GeneralException = "generalException";
12-
13-
internal static string InvalidRequest = "invalidRequest";
14-
15-
internal static string ItemNotFound = "itemNotFound";
16-
17-
internal static string NotAllowed = "notAllowed";
18-
19-
internal static string Timeout = "timeout";
20-
21-
internal static string TooManyRedirects = "tooManyRedirects";
22-
23-
internal static string TooManyRetries = "tooManyRetries";
24-
25-
internal static string MaximumValueExceeded = "MaximumValueExceeded";
26-
27-
internal static string InvalidArgument = "invalidArgument";
28-
29-
internal const string TemporarilyUnavailable = "temporarily_unavailable";
11+
internal const string GeneralException = "generalException";
3012
}
3113

3214
internal static class Messages
3315
{
34-
internal static string AuthenticationProviderMissing = "Authentication provider is required before sending a request.";
35-
36-
internal static string BaseUrlMissing = "Base URL cannot be null or empty.";
37-
38-
internal static string InvalidTypeForDateConverter = "DateConverter can only serialize objects of type Date.";
39-
40-
internal static string InvalidTypeForDateTimeOffsetConverter = "DateTimeOffsetConverter can only serialize objects of type DateTimeOffset.";
41-
42-
internal static string LocationHeaderNotSetOnRedirect = "Location header not present in redirection response.";
43-
44-
internal static string OverallTimeoutCannotBeSet = "Overall timeout cannot be set after the first request is sent.";
45-
46-
internal static string RequestTimedOut = "The request timed out.";
47-
48-
internal static string RequestUrlMissing = "Request URL is required to send a request.";
49-
50-
internal static string TooManyRedirectsFormatString = "More than {0} redirects encountered while sending the request.";
51-
52-
internal static string TooManyRetriesFormatString = "More than {0} retries encountered while sending the request.";
53-
54-
internal static string UnableToCreateInstanceOfTypeFormatString = "Unable to create an instance of type {0}.";
55-
56-
internal static string UnableToDeserializeDate = "Unable to deserialize the returned Date.";
57-
58-
internal static string UnableToDeserializeDateTimeOffset = "Unable to deserialize the returned DateDateTimeOffset.";
59-
60-
internal static string UnexpectedExceptionOnSend = "An error occurred sending the request.";
61-
62-
internal static string UnexpectedExceptionResponse = "Unexpected exception returned from the service.";
63-
64-
internal static string MaximumValueExceeded = "{0} exceeds the maximum value of {1}.";
65-
66-
internal static string NullParameter = "{0} parameter cannot be null.";
67-
68-
internal static string UnableToDeserializeContent = "Unable to deserialize content.";
69-
70-
internal static string InvalidDependsOnRequestId = "Corresponding batch request id not found for the specified dependsOn relation.";
16+
internal const string MaximumValueExceeded = "{0} exceeds the maximum value of {1}.";
7117

72-
internal static string ExpiredUploadSession = "Upload session expired. Upload cannot resume";
18+
internal const string NullParameter = "{0} parameter cannot be null.";
7319

74-
internal static string NoResponseForUpload = "No Response Received for upload.";
20+
internal const string UnableToDeserializeContent = "Unable to deserialize content.";
7521

76-
internal static string NullValue = "{0} cannot be null.";
22+
internal const string InvalidDependsOnRequestId = "Corresponding batch request id not found for the specified dependsOn relation.";
7723

78-
internal static string UnexpectedMsalException = "Unexpected exception returned from MSAL.";
24+
internal const string ExpiredUploadSession = "Upload session expired. Upload cannot resume";
7925

80-
internal static string UnexpectedException = "Unexpected exception occured while authenticating the request.";
26+
internal const string NoResponseForUpload = "No Response Received for upload.";
8127

82-
internal static string MissingRetryAfterHeader = "Missing retry after header.";
28+
internal const string MissingRetryAfterHeader = "Missing retry after header.";
8329

84-
internal static string PageIteratorRequestError = "Error occured when making a request with the page iterator. See inner exception for more details.";
30+
internal const string PageIteratorRequestError = "Error occured when making a request with the page iterator. See inner exception for more details.";
8531

86-
internal static string BatchRequestError = "Error occured when making the batch request. See inner exception for more details.";
32+
internal const string BatchRequestError = "Error occured when making the batch request. See inner exception for more details.";
8733

88-
public static string InvalidProxyArgument = "Proxy cannot be set more once. Proxy can only be set on the proxy or defaultHttpHandler argument and not both.";
34+
internal const string InvalidProxyArgument = "Proxy cannot be set more once. Proxy can only be set on the proxy or defaultHttpHandler argument and not both.";
8935
}
9036
}
9137
}

0 commit comments

Comments
 (0)