reordered type constructors for clarity
separated out exceptions that users of the client should not catch