mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-14 12:00:38 -05:00
Use generic db exceptions rather than sqlite3 specific ones
This commit is contained in:
parent
a43b40449b
commit
279a547a8b
2 changed files with 2 additions and 6 deletions
|
|
@ -21,8 +21,6 @@ from twisted.internet import defer
|
|||
|
||||
from collections import namedtuple
|
||||
|
||||
import sqlite3
|
||||
|
||||
|
||||
RoomAliasMapping = namedtuple(
|
||||
"RoomAliasMapping",
|
||||
|
|
@ -91,7 +89,7 @@ class DirectoryStore(SQLBaseStore):
|
|||
},
|
||||
desc="create_room_alias_association",
|
||||
)
|
||||
except sqlite3.IntegrityError:
|
||||
except self.database_engine.module.IntegrityError:
|
||||
raise SynapseError(
|
||||
409, "Room alias %s already exists" % room_alias.to_string()
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue