move errors to sperrors package

Reduce complexity of error handling to simple go "err" methods.
Centralize the error handler routines so that the proper response is
returned.