Stop publishing on duplicate page

This commit is contained in:
Stéphane Goetz 2016-01-25 14:47:37 +01:00
bovenliggende ef5dc8ea52
commit 74b11f6c7b
2 gewijzigde bestanden met toevoegingen van 10 en 0 verwijderingen

Bestand weergeven

@ -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());
}

Bestand weergeven

@ -0,0 +1,6 @@
<?php namespace Todaymade\Daux\Format\Confluence;
class DuplicateTitleException extends \RuntimeException
{
}