Question:
[2023-11-16 00:42:18,102] ERROR in app: Exception on /register [POST]
Traceback (most recent call last):
File "/home/runner/New-Star-Cards/venv/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/home/runner/New-Star-Cards/venv/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/runner/New-Star-Cards/venv/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/home/runner/New-Star-Cards/venv/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "main.py", line 274, in decorated_function
return f(*args, **kwargs)
File "main.py", line 334, in register
create_user(username, first_name, last_name,
File "main.py", line 46, in create_user
cur.execute(
psycopg2.errors.StringDataRightTruncation: value too long for type character varying(50)
When I try to append a string to the Replit PostgreSQL database, it gives me this error. Why?