Closed emanuelen5 closed 4 years ago
The solution is to just add timeout=0.5
to the request. See https://requests.readthedocs.io/en/master/api/#main-interface.
Suggestion to solution in 6b0f34d80256eb934a294de4d0ae46c8fe806c32, @emanuelen5 can you try it, I am still not great with the backend-part :-).
Suggested ways of injecting the problem can be found here: https://stackoverflow.com/questions/100841/artificially-create-a-connection-timeout-error
I'd say that we need to create some unit tests to be able to check this thoroughly.
https://github.com/makerspace/memberbooth/blob/56bfa79e975b813b7ce37eeedc140c0c739231f6/src/backend/makeradmin.py#L31
See https://requests.readthedocs.io/en/master/user/quickstart/ for an explanation.