Create BaseExceptionHandlerFactory to handle the errors