Better handle and document HostingServiceErrors from post-commit operations.
Review Request #10627 — Created July 15, 2019 and submitted
When listing commits on a repository or posting a change based on a
HostingServiceErrors that came up would fail to be caught,
resulting in HTTP 500 errors. Furthermore,
SCMErrors when posting a
commit for review would lack any detailed error information. It wasn't
entirely clear what the responsibilities of the callers were in some of
these cases either, since it's been a long time since some of these
methods had received any new documentation.
Now, the API endpoints are careful to catch both
SCMErrorexceptions, and to use their messages for the message
sent back to the caller.
Documentation for all methods in-between have been updated to specify
that these exceptions (and some others) may occur, making it a lot more
clear what the caller is responsible for catching.
Unit tests pass.
Hit problems due to this in real-world testing. Verified I saw suitable
error messages in the UI from the hosting service backend.