narrow catch to nextcloud dbal exceptions
This commit is contained in:
parent
06f1a9a978
commit
83c18ad623
|
@ -70,7 +70,7 @@ class EpisodeActionController extends Controller {
|
||||||
return $this->episodeActionWriter->save($episodeActionEntity);
|
return $this->episodeActionWriter->save($episodeActionEntity);
|
||||||
} catch (UniqueConstraintViolationException $uniqueConstraintViolationException) {
|
} catch (UniqueConstraintViolationException $uniqueConstraintViolationException) {
|
||||||
return $this->updateEpisodeAction($episodeAction, $episodeActionEntity);
|
return $this->updateEpisodeAction($episodeAction, $episodeActionEntity);
|
||||||
} catch (\Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
if ($exception->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) {
|
if ($exception->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) {
|
||||||
return $this->updateEpisodeAction($episodeAction, $episodeActionEntity);
|
return $this->updateEpisodeAction($episodeAction, $episodeActionEntity);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue