Stop publishing on duplicate page
This commit is contained in:
parent
ef5dc8ea52
commit
74b11f6c7b
@ -69,6 +69,10 @@ class Api
|
||||
$message .= (string) $response->getBody();
|
||||
}
|
||||
|
||||
if ($level == '4' && strpos($message, "page with this title already exists") !== false) {
|
||||
return new DuplicateTitleException($message, 0, $e->getPrevious());
|
||||
}
|
||||
|
||||
return new BadResponseException($message, $request, $response, $e->getPrevious());
|
||||
}
|
||||
|
||||
|
6
libs/Format/Confluence/DuplicateTitleException.php
Normal file
6
libs/Format/Confluence/DuplicateTitleException.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php namespace Todaymade\Daux\Format\Confluence;
|
||||
|
||||
class DuplicateTitleException extends \RuntimeException
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user