User Management: invalid response to register (Python)

Hi,

My teste pytest -m user_management is OK but when I try to check the page status I get an error that I don’t know how to fix.

User Management: invalid response to register

I looked here in the old questions and found an answer from Nathan_Leniz(mongo employee) that it can be fixed by changing StopIteration on the exception block in get_movie to except Exception as e:

I did it, but I still get the same error.

I appreciate any help

Thank you

the promp return:

* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [17/Nov/2021 16:49:37] "←[37mGET /api/v1/movies/ HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:40] "←[37mGET /api/v1/movies/countries?countries=Australia HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:43] "←[37mGET /api/v1/movies/search?cast=Kevin%20Connolly HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:45] "←[37mGET /api/v1/movies/search?text=shawshank HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:47] "←[37mGET /api/v1/movies/search?genre=Talk-Show HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:50] "←[37mGET /api/v1/movies/search?cast=Morgan%20Freeman&page=0 HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:52] "←[37mGET /api/v1/movies/search?cast=Morgan%20Freeman&page=1 HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:53] "←[37mGET /api/v1/movies/search?genre=Action&page=0 HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:55] "←[37mGET /api/v1/movies/search?genre=Action&page=5 HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:57] "←[37mGET /api/v1/movies/search?text=Heist&page=0 HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:49:59] "←[37mGET /api/v1/movies/search?text=Heist&page=5 HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:50:03] "←[37mGET /api/v1/movies/facet-search?cast=Denzel%20Washington&page=0 HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:50:05] "←[37mGET /api/v1/movies/facet-search?cast=Morgan%20Freeman&page=2 HTTP/1.1←[0m" 200 -
127.0.0.1 - - [17/Nov/2021 16:50:22] "←[31m←[1mPOST /api/v1/user/register HTTP/1.1←[0m" 400 -