Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Error for Sanitizer Add #7005

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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