We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When someone was creating a user, we've got following exception, leading to a 500 response:
1733292679921 ERROR:uwsgi_file__app_main:Exception on /v1/users/ [POST] 1733292679921 Traceback (most recent call last): 1733292679921 File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2190, in wsgi_app 1733292679921 response = self.full_dispatch_request() 1733292679921 File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1486, in full_dispatch_request 1733292679921 rv = self.handle_user_exception(e) 1733292679921 File "/usr/local/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function 1733292679921 return cors_after_request(app.make_response(f(*args, **kwargs))) 1733292679921 File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1484, in full_dispatch_request 1733292679921 rv = self.dispatch_request() 1733292679921 File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1469, in dispatch_request 1733292679921 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) 1733292679921 File "/app/./routes/base.py", line 20, in __call__ 1733292679921 return handler(*args, **kwargs) 1733292679921 File "/app/./routes/__init__.py", line 35, in wrapper 1733292679921 return f(*args, **kwargs) 1733292679921 File "/app/./db/__init__.py", line 50, in inner 1733292679921 return func(*args, **kwargs) 1733292679921 File "/app/./routes/__init__.py", line 53, in wrapper 1733292679921 return f(*args, **kwargs) 1733292679921 File "/app/./routes/users/user.py", line 62, in post 1733292679921 email=request_json["email"], 1733292679921 KeyError: 'email' 1733292679922 [pid: 30|app: 0|req: 8631/19159] 100.64.6.69 () {68 vars in 1813 bytes} [Wed Dec 4 06:11:19 2024] POST /v1/users/ => generated 265 bytes in 9 msecs (HTTP/1.1 500) 4 headers in 168 bytes (1 switches on core 0) 1733292679923 100.64.6.69 - - [04/Dec/2024:06:11:19 +0000] "POST /v1/users/ HTTP/1.1" 500 265 "https://farm.openzim.org/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15" "185.72.67.134"
Create a user without any email
Create user endpoint is at
zimfarm/dispatcher/backend/src/routes/users/user.py
Lines 51 to 76 in 6b4dc7a
It relies on UserCreateSchema at
UserCreateSchema
zimfarm/dispatcher/backend/src/common/schemas/parameters.py
Lines 146 to 150 in 6b4dc7a
This schema does not require all fields, while it probably should
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem
When someone was creating a user, we've got following exception, leading to a 500 response:
Reproducing steps
Create a user without any email
Analysis
Create user endpoint is at
zimfarm/dispatcher/backend/src/routes/users/user.py
Lines 51 to 76 in 6b4dc7a
It relies on
UserCreateSchema
atzimfarm/dispatcher/backend/src/common/schemas/parameters.py
Lines 146 to 150 in 6b4dc7a
This schema does not require all fields, while it probably should
The text was updated successfully, but these errors were encountered: