Skip to content

Commit

Permalink
Update Error for Sanitizer Add (#7005)
Browse files Browse the repository at this point in the history
* create cherry-pickable commit
* update tests to reflect new logged outputs
  • Loading branch information
scbedd authored Sep 22, 2023
1 parent b9e245f commit 5bc8c65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ public async Task TestAddSanitizerThrowsOnMissingRequiredArgument()
);

Assert.True(assertion.StatusCode.Equals(HttpStatusCode.BadRequest));
Assert.Contains("Required parameter key System.String target was not found in the request body.", assertion.Message);
Assert.Contains("Required parameter key \"target\" was not found in the request body.", assertion.Message);
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions tools/test-proxy/Azure.Sdk.Tools.TestProxy/Admin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private object GenerateInstance(string typePrefix, string name, HashSet<string>
{
if (!acceptableEmptyArgs.Contains(param.Name))
{
throw new HttpException(HttpStatusCode.BadRequest, $"Parameter {param.Name} was passed with no value. Please check the request body and try again.");
throw new HttpException(HttpStatusCode.BadRequest, $"Parameter \"{param.Name}\" was passed with no value. Please check the request body and try again.");
}
}

Expand All @@ -229,7 +229,7 @@ private object GenerateInstance(string typePrefix, string name, HashSet<string>
}
else
{
throw new HttpException(HttpStatusCode.BadRequest, $"Required parameter key {param} was not found in the request body.");
throw new HttpException(HttpStatusCode.BadRequest, $"Required parameter key \"{param.Name}\" was not found in the request body.");
}
}
}
Expand Down

0 comments on commit 5bc8c65

Please sign in to comment.