Fix failing tests for pending filter.
Fix failing tests for errorHandler middleware.
Fix failing tests for pending middleware.