Jhbate/401 500

@nicolashery have a look at this. Have added a platform call to log errors to via high-water. The internals of the call may change at a later date but the ability to save errors to the platform will remain