We should formalize the errors we throw (e.g. in cases where we have custom messages, like connection errors, or "node doesn't exist", etc.), but most importantly, there should be a documented way to determine whether a thrown error is due to a client mistake (e.g. "node doesn't exist") vs. a server one (e.g. connection error). This generally maps pretty nicely to HTTP 4xx vs. 5xx status codes.