(feat) Adjusted for new Middleware process
(refactor) Created concise error handling