Skip to content

Commit

Permalink
[#293] handle more specific database errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SonnyBA committed Dec 4, 2024
1 parent 8238e66 commit bb1c946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openklant/setup_configuration/steps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

from django.core.exceptions import ValidationError
from django.db import DatabaseError
from django.db import IntegrityError

from django_setup_configuration.configuration import BaseConfigurationStep
from django_setup_configuration.exceptions import ConfigurationRunFailed
Expand Down Expand Up @@ -62,7 +62,7 @@ def execute(self, model: TokenAuthGroupConfigurationModel) -> None:
if key != "identifier"
},
)
except DatabaseError as exception:
except IntegrityError as exception:
exception_message = f"Failed configuring token {item.identifier}."
raise ConfigurationRunFailed(exception_message) from exception

Expand Down

0 comments on commit bb1c946

Please sign in to comment.