Skip to content

Commit 408f9e8

Browse files
Merge pull request #57491 from nextcloud/fix/taskprocessing-userfacingerrormessage-responsedef
fix(TaskProcessing): Expose userFacingErrorMessage on ResponseDefinitions#CoreTaskProcessingTask
2 parents 08d4ccb + 1182b6d commit 408f9e8

File tree

6 files changed

+27
-5
lines changed

6 files changed

+27
-5
lines changed

core/ResponseDefinitions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@
212212
* endedAt: ?int,
213213
* allowCleanup: bool,
214214
* includeWatermark: bool,
215+
* userFacingErrorMessage: ?string,
215216
* }
216217
*
217218
* @psalm-type CoreProfileAction = array{

core/openapi-ex_app.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@
203203
"startedAt",
204204
"endedAt",
205205
"allowCleanup",
206-
"includeWatermark"
206+
"includeWatermark",
207+
"userFacingErrorMessage"
207208
],
208209
"properties": {
209210
"id": {
@@ -280,6 +281,10 @@
280281
},
281282
"includeWatermark": {
282283
"type": "boolean"
284+
},
285+
"userFacingErrorMessage": {
286+
"type": "string",
287+
"nullable": true
283288
}
284289
}
285290
},

core/openapi-full.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,8 @@
663663
"startedAt",
664664
"endedAt",
665665
"allowCleanup",
666-
"includeWatermark"
666+
"includeWatermark",
667+
"userFacingErrorMessage"
667668
],
668669
"properties": {
669670
"id": {
@@ -740,6 +741,10 @@
740741
},
741742
"includeWatermark": {
742743
"type": "boolean"
744+
},
745+
"userFacingErrorMessage": {
746+
"type": "string",
747+
"nullable": true
743748
}
744749
}
745750
},

core/openapi.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,8 @@
663663
"startedAt",
664664
"endedAt",
665665
"allowCleanup",
666-
"includeWatermark"
666+
"includeWatermark",
667+
"userFacingErrorMessage"
667668
],
668669
"properties": {
669670
"id": {
@@ -740,6 +741,10 @@
740741
},
741742
"includeWatermark": {
742743
"type": "boolean"
744+
},
745+
"userFacingErrorMessage": {
746+
"type": "string",
747+
"nullable": true
743748
}
744749
}
745750
},

lib/public/TaskProcessing/Task.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ final public function setIncludeWatermark(bool $includeWatermark): void {
295295
}
296296

297297
/**
298-
* @psalm-return array{id: int, lastUpdated: int, type: string, status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN', userId: ?string, appId: string, input: array<string, list<numeric|string>|numeric|string>, output: ?array<string, list<numeric|string>|numeric|string>, customId: ?string, completionExpectedAt: ?int, progress: ?float, scheduledAt: ?int, startedAt: ?int, endedAt: ?int, allowCleanup: bool, includeWatermark: bool}
298+
* @psalm-return array{id: int, lastUpdated: int, type: string, status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN', userId: ?string, appId: string, input: array<string, list<numeric|string>|numeric|string>, output: ?array<string, list<numeric|string>|numeric|string>, customId: ?string, completionExpectedAt: ?int, progress: ?float, scheduledAt: ?int, startedAt: ?int, endedAt: ?int, allowCleanup: bool, includeWatermark: bool, userFacingErrorMessage: ?string}
299299
* @since 30.0.0
300300
*/
301301
final public function jsonSerialize(): array {
@@ -316,6 +316,7 @@ final public function jsonSerialize(): array {
316316
'endedAt' => $this->getEndedAt(),
317317
'allowCleanup' => $this->getAllowCleanup(),
318318
'includeWatermark' => $this->getIncludeWatermark(),
319+
'userFacingErrorMessage' => $this->getUserFacingErrorMessage(),
319320
];
320321
}
321322

openapi.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@
709709
"startedAt",
710710
"endedAt",
711711
"allowCleanup",
712-
"includeWatermark"
712+
"includeWatermark",
713+
"userFacingErrorMessage"
713714
],
714715
"properties": {
715716
"id": {
@@ -786,6 +787,10 @@
786787
},
787788
"includeWatermark": {
788789
"type": "boolean"
790+
},
791+
"userFacingErrorMessage": {
792+
"type": "string",
793+
"nullable": true
789794
}
790795
}
791796
},

0 commit comments

Comments
 (0)