Repository navigation
fix(errors): report template misses as not-exist instead of unsupported-language - #197
Merged
zhangwenjun-huawei merged 3 commits intoSep 20, 2026
Conversation
…ed-language The template.not_found message claimed the language was unsupported even when the templateUri itself did not exist, which misdirected callers. Reword the bilingual message to a plain does-not-exist statement: the language is fixed configuration, so the message no longer echoes it, while the declared fact parameters (template_uri, language) and the error-code contract stay unchanged - facts still carry the language for programmatic diagnosis. Also clarify the ErrorCatalog Javadoc that a message template may render a subset of the declared facts, sync the zh/en API reference error tables, and add ErrorMessagesResourceTest pinning both languages and the retained language fact. Signed-off-by: w00609601 <wushunhao1@huawei.com>
…essage LlmBackedPromptMetadataExtractorTest asserted the rendered message echoed the configured language. After the template.not_found message was reworded to a plain does-not-exist, the language stays in the facts only; assert the message omits it and the facts keep it for programmatic diagnosis. Signed-off-by: w00609601 <wushunhao1@huawei.com>
Three concurrent reviews returned APPROVE with two minor findings: the TEMPLATE_NOT_FOUND constant Javadoc still framed the failure as a language problem, and ErrorMessagesResourceTest carried a tautological third case. Reword the constant Javadoc to describe the trigger (missing for the configured language) and the message (names the URI), and drop the redundant case since the retained facts are already pinned by LlmBackedPromptMetadataExtractorTest. Signed-off-by: w00609601 <wushunhao1@huawei.com>
Contributor
Author
Review and follow-upThree independent review passes were run in parallel with distinct lenses (correctness/contract integrity, tests/CI, docs/port fidelity). All three returned APPROVE with no blocker or major findings. Two minor findings were raised and have been addressed in
Verification
Notes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port of the error-message part of project-openan/a2a-t-sdk-python#59. The built-in fallback for missing
local_filebusiness content already exists in the Java SDK, so this PR only carries the follow-up message fix.When a template is missing,
template.not_foundused to claim the language was unsupported even when thetemplateUriitself did not exist, misdirecting callers.模板「{template_uri}」不存在Template '{template_uri}' does not existtemplate_uri,language) and the error-code contract are unchanged; the language is fixed configuration, so the message no longer echoes it while the facts still carry it for programmatic diagnosis.ErrorCatalogJavadoc that a message template may render a subset of the declared facts.ErrorMessagesResourceTestpinning the rendered message in both languages; the retained facts are pinned byLlmBackedPromptMetadataExtractorTest.Verification
ErrorMessagesResourceTest: 2 passedLlmBackedPromptMetadataExtractorTest: 9 passedmvn -B clean verify -pl '!a2a-t-corpus'(the CI command) on a clean checkout of the head: BUILD SUCCESS for every moduleSigned-off-by: w00609601 wushunhao1@huawei.com