This commit is contained in:
2018-10-03 19:15:54 +00:00
parent 345eef119f
commit 57a62f9b86
2 changed files with 10 additions and 7 deletions

View File

@@ -233,7 +233,11 @@ namespace raven_integration
public static void ValidateDataReturnResponseOk(ApiResponse a)
{
a.ObjectResponse["error"].Should().BeNull("There should not be an error on an api call");
var ErrorMessage = string.Empty;
var ERR = a.ObjectResponse["error"];
if (ERR != null)
ErrorMessage = ERR.Value<string>();
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");
}