Start to generalize the error handling. Test app fixed. Flow working as ...

...expected.