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

Go invalid verb parameter error message could be improved #4783

Open
matt2e opened this issue Mar 5, 2025 · 0 comments
Open

Go invalid verb parameter error message could be improved #4783

matt2e opened this issue Mar 5, 2025 · 0 comments
Labels
triage Issue needs triaging

Comments

@matt2e
Copy link
Collaborator

matt2e commented Mar 5, 2025

This error happens for a bunch of reasons. It'd be good if we could make it clearer:
unsupported verb parameter type; verbs must have the signature func(Context, Request?, Resources...)
It happens a lot when renaming verbs or topics but it could be a lot clearer to the user.

  • It'd be good to include the unsupported type in the text

Causes that we should be able to detect and craft a more specific message for:

Missing import
If you put time.TimeClient as a parameter, you may have forgotten to import time

Parameter Order
If the issue is that you put a type after a resource and theres no existing request type, we should suggest a new ordering to the user

Client name not right
If the resource type looks like a client (ie modulepackage.___Client) but does not match any known clients, we should explain that.

@matt2e matt2e added the go label Mar 5, 2025
@github-actions github-actions bot added the triage Issue needs triaging label Mar 5, 2025
@alecthomas alecthomas mentioned this issue Mar 5, 2025
@alecthomas alecthomas removed the go label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants