Rework how errors are propagated from the daemon code to the HTTP client, creating an exception hierarchy to handle the most common cases.