ZeusWPI / MOZAIC

MOZAIC is the Massive Online Zeus Artificial Intelligence Competition platform
GNU Lesser General Public License v3.0
13 stars 6 forks source link

Request errors #271

Open iasoon opened 6 years ago

iasoon commented 6 years ago

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, ....

iasoon commented 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.