When user enters wrong login in details , there will not be any error using create_engine(). After using engine.connect() or engine.execute() the error message will be generated. This can be captured and given proper message to user to check the details.