Azure / Azure/azure-sdk-tools

[tsp-client] Improve error message when the input tspconfig URL is invalid

Open
#11,900 0 comments 0 reactions 0 assignees View on GitHub
needs-triage
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

I'm integrating 'tsp-client' into a MCP tool to generate SDK. We would like to have 'tsp-client' improve the error message so that LLM can understand the issue better and provide the suggestions. With this, MCP tool doesn't need to duplicate the validation logic.

The issue is: when the input tspconfig is a remote URL, validation fails if the value doesn't have commitSHA or it's a raw content URL.

Could we enhance the error message including why it fails? And also include an example URL in the message, like:
https://github.com/Azure/azure-rest-api-specs/blob/a87c04ebb31db4da3d0585280f9f57cfaafdc1fb/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml

CC: @catalinaperalta

Contributor guide

Open the contributing guide

Research direction

Start at the tsp-client validation entry point for remote tspconfig URLs and trace how invalid URLs are reported. Update the error output so it explains missing commitSHA or raw content URLs and includes the provided example URL; verify the validation behavior with the relevant tests.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.