Introduce a client error type which preserves HTTP error information but which doesn't render the HTTP details by default.
Refactor to introduce client/server separation, including a typed client API and a HTTP REST server implementation. Refactor the terminal to be an API consumer.