Community
Participate
Working Groups
In git operations that use progress service we would like to handle some errors on the client site, for instance: wrong/missing server fingerprint, password/private key needed. Currently all we can return in the task error details is a string message and result http status is 500. It would be good if the task could indicate a type of an error, for instance 401 and pass some more details, for instance in json, like {host: "dev.eclipse.org", fingerprint: "45:59:..."}. How do you think we could do it? Adding a dedicated status type and pass additional information?
If you pass a ServerStatus to TaskInfo#done() then the httpCode should at least be available... The task service needs to know how to serialize the status, so arbitrary status extensions or subclasses won't work. As we talked about yesterday, it would be simpler workflow for the original request to fail with 401 rather than return a task that contains the failure.
I added "error data" param to ServerStatus and already used it to pass the server fingerprint. It works for my needs, but if you have a better idea for it please reopen this bug.