https://bugs.gpodder.org/show_bug.cgi?id=745
Summary: Legacy API does not handle IntegrityError
Product: my.gPodder.org
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: low
Component: Server-side API Backend
AssignedTo: [email protected]
ReportedBy: [email protected]
I just received the following traceback for a /upload request using the Legacy
API:
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/django/core/handlers/base.py", line
86, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/mygpo/mygpo/api/legacy.py", line 61, in upload
s.save()
File "/var/lib/python-support/python2.5/django/db/models/base.py", line 311,
in save
self.save_base(force_insert=force_insert, force_update=force_update)
File "/var/lib/python-support/python2.5/django/db/models/base.py", line 383,
in save_base
result = manager._insert(values, return_id=update_pk)
File "/var/lib/python-support/python2.5/django/db/models/manager.py", line
138, in _insert
return insert_query(self.model, values, **kwargs)
File "/var/lib/python-support/python2.5/django/db/models/query.py", line 894,
in insert_query
return query.execute_sql(return_id)
File "/var/lib/python-support/python2.5/django/db/models/sql/subqueries.py",
line 309, in execute_sql
cursor = super(InsertQuery, self).execute_sql(None)
File "/var/lib/python-support/python2.5/django/db/models/sql/query.py", line
1734, in execute_sql
cursor.execute(sql, params)
File "/var/lib/python-support/python2.5/django/db/backends/mysql/base.py",
line 83, in execute
return self.cursor.execute(query, args)
File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 166, in
execute
self.errorhandler(self, exc, value)
File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line 35, in
defaulterrorhandler
raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate entry 'This subscription already exists!' for
key 2")
--
Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
gPodder-Bugs mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-bugs