ow
This commit is contained in:
1 parent
647a1c38ab
commit
a85e87d330
5 files changed
+20
-18
No files matched your search
@@ -138,9 +138,9 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}\r\n{1}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION), errors));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}\r\n{1}", response.ReasonPhrase, errors));
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
|
||||
response.EnsureSuccessStatusCode();
|
||||
@@ -188,9 +188,9 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}\r\n{1}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION), errors));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}\r\n{1}", response.ReasonPhrase, errors));
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
|
||||
response.EnsureSuccessStatusCode();
|
||||
@@ -244,9 +244,9 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}\r\n{1}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION), errors));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}\r\n{1}", response.ReasonPhrase, errors));
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
|
||||
response.EnsureSuccessStatusCode();
|
||||
@@ -275,9 +275,9 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}\r\n{1}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION), errors));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}\r\n{1}", response.ReasonPhrase, errors));
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
|
||||
response.EnsureSuccessStatusCode();
|
||||
@@ -306,9 +306,9 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}\r\n{1}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION), errors));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}\r\n{1}", response.ReasonPhrase, errors));
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
|
||||
response.EnsureSuccessStatusCode();
|
||||
@@ -335,9 +335,9 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}\r\n{1}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION), errors));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}\r\n{1}", response.ReasonPhrase, errors));
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
|
||||
response.EnsureSuccessStatusCode();
|
||||
@@ -379,9 +379,9 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}\r\n{1}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION), errors));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}\r\n{1}", response.ReasonPhrase, errors));
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
Reference in new issue
Block a user