This commit is contained in:
2018-10-03 19:32:35 +00:00
parent 57a62f9b86
commit 5a235dc77c
2 changed files with 47 additions and 26 deletions

View File

@@ -236,7 +236,20 @@ namespace raven_integration
var ErrorMessage = string.Empty;
var ERR = a.ObjectResponse["error"];
if (ERR != null)
ErrorMessage = ERR.Value<string>();
{
var ecode = ERR["code"];
if (ecode != null)
ErrorMessage += $"CODE: {ecode} ";
var emsg = ERR["message"];
if (emsg != null)
ErrorMessage += $"MESSAGE: {emsg} ";
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["result"].Should().NotBeNull("A result should be returned");
}