Clarify tool validation error messages (#1023)
- DefaultJsonSchemaValidator now emits a neutral message; - Call sites in ToolInputValidator and the server output handlers prepend their own context prefix, - Integration test assertions strengthened accordingly. Closes #986 Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com> * address review comments Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com> * address review comments Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com> --------- Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
df75857fb1
commit
99faac65f7
1 changed files with 30 additions and 25 deletions
|
|
@ -182,6 +182,9 @@ class ToolInputValidationIntegrationTests {
|
|||
|
||||
assertThat(result.isError()).isTrue();
|
||||
String errorMessage = ((TextContent) result.content().get(0)).text();
|
||||
assertThat(errorMessage).startsWith("Tool (test-tool) input validation failed:");
|
||||
assertThat(errorMessage).containsIgnoringCase("Validation failed");
|
||||
assertThat(errorMessage).containsIgnoringCase("JSON schema validation errors");
|
||||
assertThat(errorMessage).containsIgnoringCase(expectedErrorSubstring);
|
||||
}
|
||||
finally {
|
||||
|
|
|
|||
Loading…
Reference in a new issue