Revert "Fixed #22058 -- Refactored handlers and created a generic mechanism to deal with server/client errors."

This reverts commit 02afdad86ac215d4dad8f890dbcfabd78adf2edc.
Refactored handlers.