Skip to content

Commit c375a32

Browse files
committed
Errors can't be hydrated so do an manual instantiation
1 parent 45f1fd1 commit c375a32

File tree

437 files changed

+849
-849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+849
-849
lines changed

src/Operation/Actions/CancelWorkflowRun.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : Schema\
5555
switch ($contentType) {
5656
case 'application/json':
5757
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
58-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 409, 'error' => $body));
58+
throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
5959
}
6060
break;
6161
}

src/Operation/Actions/DeleteWorkflowRunLogs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : void
4444
switch ($contentType) {
4545
case 'application/json':
4646
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
47-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 403, 'error' => $body));
47+
throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
4848
}
4949
break;
5050
/**Internal Error**/
5151
case 500:
5252
switch ($contentType) {
5353
case 'application/json':
5454
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
55-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 500, 'error' => $body));
55+
throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
5656
}
5757
break;
5858
}

src/Operation/Actions/DownloadArtifact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : array
4949
switch ($contentType) {
5050
case 'application/json':
5151
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
52-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 410, 'error' => $body));
52+
throw new ErrorSchemas\BasicError(410, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
5353
}
5454
break;
5555
/**Response**/

src/Operation/Actions/DownloadArtifactStreaming.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Obs
5151
switch ($contentType) {
5252
case 'application/json':
5353
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
54-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 410, 'error' => $body));
54+
throw new ErrorSchemas\BasicError(410, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
5555
}
5656
break;
5757
/**Response**/

src/Operation/Actions/ListJobsForWorkflowRunAttempt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : Schema\
6464
switch ($contentType) {
6565
case 'application/json':
6666
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
67-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 404, 'error' => $body));
67+
throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
6868
}
6969
break;
7070
}

src/Operation/Actions/ListJobsForWorkflowRunAttemptListing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : Schema\
6464
switch ($contentType) {
6565
case 'application/json':
6666
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
67-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 404, 'error' => $body));
67+
throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
6868
}
6969
break;
7070
}

src/Operation/Activity/CheckRepoIsStarredByAuthenticatedUser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : void
4141
switch ($contentType) {
4242
case 'application/json':
4343
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
44-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 404, 'error' => $body));
44+
throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
4545
}
4646
break;
4747
/**Requires authentication**/
4848
case 401:
4949
switch ($contentType) {
5050
case 'application/json':
5151
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
52-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 401, 'error' => $body));
52+
throw new ErrorSchemas\BasicError(401, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
5353
}
5454
break;
5555
/**Forbidden**/
5656
case 403:
5757
switch ($contentType) {
5858
case 'application/json':
5959
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
60-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 403, 'error' => $body));
60+
throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
6161
}
6262
break;
6363
}

src/Operation/Activity/DeleteThreadSubscription.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : void
3838
switch ($contentType) {
3939
case 'application/json':
4040
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
41-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 403, 'error' => $body));
41+
throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
4242
}
4343
break;
4444
/**Requires authentication**/
4545
case 401:
4646
switch ($contentType) {
4747
case 'application/json':
4848
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
49-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 401, 'error' => $body));
49+
throw new ErrorSchemas\BasicError(401, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
5050
}
5151
break;
5252
}

src/Operation/Activity/GetRepoSubscription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : Schema\
5252
switch ($contentType) {
5353
case 'application/json':
5454
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
55-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 403, 'error' => $body));
55+
throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
5656
}
5757
break;
5858
}

src/Operation/Activity/GetThread.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ function createResponse(\Psr\Http\Message\ResponseInterface $response) : Schema\
4949
switch ($contentType) {
5050
case 'application/json':
5151
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
52-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 403, 'error' => $body));
52+
throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
5353
}
5454
break;
5555
/**Requires authentication**/
5656
case 401:
5757
switch ($contentType) {
5858
case 'application/json':
5959
$this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
60-
throw $this->hydrator->hydrateObject(ErrorSchemas\BasicError::class, array('status' => 401, 'error' => $body));
60+
throw new ErrorSchemas\BasicError(401, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
6161
}
6262
break;
6363
}

0 commit comments

Comments
 (0)