Better error handling on early failure

If the request fails before context type is established, still handle
the error so that it can be debugged.
Merge branch 'ws' of github.com:nitrogen/nitrogen_core into ws