Skip to content

Commit 97df797

Browse files
committed
Gracefully handle already existing workspace
1 parent c78124c commit 97df797

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/GeoServer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function createWorkspace()
116116

117117
$response = $this->post($route, ['workspace' => [ 'name' => $this->workspace] ]);
118118
} catch (ErrorResponseException $ex) {
119-
if ($ex->getCode() !== 401) {
119+
if ($ex->getCode() !== 401 && $ex->getCode() !== 409) {
120120
throw $ex;
121121
}
122122
}

tests/Concern/SetupIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
trait SetupIntegrationTest
2828
{
2929
/**
30-
* @var OneOffTech\GeoServer\Client
30+
* @var \OneOffTech\GeoServer\GeoServer
3131
*/
3232
protected $geoserver = null;
3333

0 commit comments

Comments
 (0)