diff options
author | 2021-09-22 10:49:36 +0100 | |
---|---|---|
committer | 2021-09-22 11:02:16 +0100 | |
commit | 6abf47abd515ec789ad2f271dcbc48403a3e0d7e (patch) | |
tree | e2e109110c7c949f86e01a9df7eb6863ba992aa4 /pydis_site/apps/api/models | |
parent | Pin psycopg version and re-lock (diff) |
Rename an error to have a correct error suffix
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r-- | pydis_site/apps/api/models/bot/metricity.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pydis_site/apps/api/models/bot/metricity.py b/pydis_site/apps/api/models/bot/metricity.py index 5daa5c66..33fb7ad7 100644 --- a/pydis_site/apps/api/models/bot/metricity.py +++ b/pydis_site/apps/api/models/bot/metricity.py @@ -10,7 +10,7 @@ EXCLUDE_CHANNELS = [ ] -class NotFound(Exception): +class NotFoundError(Exception): """Raised when an entity cannot be found.""" pass @@ -37,7 +37,7 @@ class Metricity: values = self.cursor.fetchone() if not values: - raise NotFound() + raise NotFoundError() return dict(zip(columns, values)) @@ -58,7 +58,7 @@ class Metricity: values = self.cursor.fetchone() if not values: - raise NotFound() + raise NotFoundError() return values[0] @@ -88,7 +88,7 @@ class Metricity: values = self.cursor.fetchone() if not values: - raise NotFound() + raise NotFoundError() return values[0] @@ -127,6 +127,6 @@ class Metricity: values = self.cursor.fetchall() if not values: - raise NotFound() + raise NotFoundError() return values |