This commit is contained in:
50
util.cs
50
util.cs
@@ -253,20 +253,21 @@ namespace raven_integration
|
||||
var ERR = a.ObjectResponse["error"];
|
||||
if (ERR != null)
|
||||
{
|
||||
var ecode = ERR["code"];
|
||||
if (ecode != null)
|
||||
ErrorMessage += $"CODE: {ecode} ";
|
||||
ErrorMessage=a.ObjectResponse.ToString();
|
||||
// var ecode = ERR["code"];
|
||||
// if (ecode != null)
|
||||
// ErrorMessage += $"CODE: {ecode} ";
|
||||
|
||||
var emsg = ERR["message"];
|
||||
if (emsg != null)
|
||||
ErrorMessage += $"MESSAGE: {emsg} ";
|
||||
// var emsg = ERR["message"];
|
||||
// if (emsg != null)
|
||||
// ErrorMessage += $"MESSAGE: {emsg} ";
|
||||
|
||||
var etarget = ERR["target"];
|
||||
if (etarget != null)
|
||||
ErrorMessage += $"TARGET: {etarget} ";
|
||||
// var etarget = ERR["target"];
|
||||
// if (etarget != null)
|
||||
// ErrorMessage += $"TARGET: {etarget} ";
|
||||
}
|
||||
|
||||
a.ObjectResponse["error"].Should().BeNull("because there should not be an error on an api call, error was: {0}", ErrorMessage);
|
||||
a.ObjectResponse["error"].Should().BeNull("because there should not be an error on an api call, error result was: {0}", ErrorMessage);
|
||||
a.ObjectResponse["data"].Should().NotBeNull("A result should be returned");
|
||||
}
|
||||
|
||||
@@ -400,6 +401,35 @@ namespace raven_integration
|
||||
}
|
||||
|
||||
|
||||
public static string GenerateCustomFieldsJsonString(
|
||||
string c1 = null, string c2 = null, string c3 = null, string c4 = null,
|
||||
string c5 = null, string c6 = null, string c7 = null, string c8 = null, string c9 = null,
|
||||
string c10 = null, string c11 = null, string c12 = null, string c13 = null,
|
||||
string c14 = null, string c15 = null, string c16 = null
|
||||
)
|
||||
{
|
||||
|
||||
//Custom fields
|
||||
//"[{c1:"blah"}]
|
||||
dynamic dCustomField = new JObject();
|
||||
dCustomField.c1 = c1;
|
||||
dCustomField.c2 = c2;
|
||||
dCustomField.c3 = c3;
|
||||
dCustomField.c4 = c4;
|
||||
dCustomField.c5 = c5;
|
||||
dCustomField.c6 = c6;
|
||||
dCustomField.c7 = c7;
|
||||
dCustomField.c8 = c8;
|
||||
dCustomField.c9 = c9;
|
||||
dCustomField.c10 = c10;
|
||||
dCustomField.c11 = c11;
|
||||
dCustomField.c12 = c12;
|
||||
dCustomField.c13 = c13;
|
||||
dCustomField.c14 = c14;
|
||||
dCustomField.c15 = c15;
|
||||
dCustomField.c16 = c16;
|
||||
return dCustomField.ToString();
|
||||
}
|
||||
|
||||
|
||||
}//eoc
|
||||
|
||||
Reference in New Issue
Block a user