Open iasoon opened 6 years ago
OTOH, what I am describing might be the boundary between a programmer and user error - and this kind of error mechanism should be used for programmer errors (usually resulting in a client-side panic).
An excellent use-case is sending an error for a request that has no handler defined, as this most certainly is a programmer error.
At the moment, request handlers are allowed to fail. When they do, we'd send back an error event instead of a response event, containing a string error message. This could be an easy way to add some errors to the 'input surface' of MOZAIC servers.
Is this a mechanism we'd want to keep in its current form? It might be more appropriate to allow a rpc service to define its own error type, have custom error types per request, ....