-
Notifications
You must be signed in to change notification settings - Fork 117
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
gitsources: improve error reporting #145
Comments
@sgotti I don't understand this card because I see the gitsources api just returns custom errors. I don't see git generic errors when I call gateway api client, what we have to do? |
@alessandro-sorint Take a look at the methods calling a gitsource. You'll see that the gitsource error is wrapped in a generic error that will become a 500 when called by the api. Anyway this is something that requires thorough reasoning before implementing something. I'll come back to this later if/when needed. |
I think we can use the ErrInternal in util package or create and use a new ErrGitea and user it? |
@alessandro-sorint This isn't related to the implementation but to understand how to convert gitsources errors to the errors reported to the user. Which remote sources errors should be reported to the user? Which not? How to map the different gitsource types errors (gitea, github, gitlab) to a set of agola errors? etc...
ErrInternal is the same as returning a generic error. |
@sgotti for the types of errors I guess maybe you mean the various http 400,500 etc. how to map them |
Currently when an errors occurs inside a gitsource method it's considered as a generic error and reported to api clients as an internal server error masking the error message. So some agola cli commands will just report a generic "internal server error" instead of the real error when the user provides some wrong options that are passed to the git sources.
We can do two things:
The text was updated successfully, but these errors were encountered: