ow
This commit is contained in:
1 parent
4521deaf78
commit
647a1c38ab
18 files changed
+279
-103
No files matched your search
@@ -136,6 +136,10 @@ namespace CloudBuilder.Core.Request
|
||||
var responseContext = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
string errors = string.Empty;
|
||||
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}\r\n{1}", response.ReasonPhrase, errors));
|
||||
}
|
||||
|
||||
@@ -182,6 +186,10 @@ namespace CloudBuilder.Core.Request
|
||||
var responseContext = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
string errors = string.Empty;
|
||||
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}\r\n{1}", response.ReasonPhrase, errors));
|
||||
}
|
||||
|
||||
@@ -234,6 +242,10 @@ namespace CloudBuilder.Core.Request
|
||||
var responseContext = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
string errors = string.Empty;
|
||||
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}\r\n{1}", response.ReasonPhrase, errors));
|
||||
}
|
||||
|
||||
@@ -261,6 +273,10 @@ namespace CloudBuilder.Core.Request
|
||||
var responseContext = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
string errors = string.Empty;
|
||||
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}\r\n{1}", response.ReasonPhrase, errors));
|
||||
}
|
||||
|
||||
@@ -288,6 +304,10 @@ namespace CloudBuilder.Core.Request
|
||||
var responseContext = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
string errors = string.Empty;
|
||||
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}\r\n{1}", response.ReasonPhrase, errors));
|
||||
}
|
||||
|
||||
@@ -313,6 +333,10 @@ namespace CloudBuilder.Core.Request
|
||||
var responseContext = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
string errors = string.Empty;
|
||||
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}\r\n{1}", response.ReasonPhrase, errors));
|
||||
}
|
||||
|
||||
@@ -353,6 +377,10 @@ namespace CloudBuilder.Core.Request
|
||||
var responseContext = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
string errors = string.Empty;
|
||||
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}\r\n{1}", response.ReasonPhrase, errors));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user