diff --git a/core/ResponseDefinitions.php b/core/ResponseDefinitions.php index 82421a58039e5..6f3380bab259a 100644 --- a/core/ResponseDefinitions.php +++ b/core/ResponseDefinitions.php @@ -212,6 +212,7 @@ * endedAt: ?int, * allowCleanup: bool, * includeWatermark: bool, + * userFacingErrorMessage: ?string, * } * * @psalm-type CoreProfileAction = array{ diff --git a/core/openapi-ex_app.json b/core/openapi-ex_app.json index f2dcf97cf34c0..5fbc10f465bee 100644 --- a/core/openapi-ex_app.json +++ b/core/openapi-ex_app.json @@ -203,7 +203,8 @@ "startedAt", "endedAt", "allowCleanup", - "includeWatermark" + "includeWatermark", + "userFacingErrorMessage" ], "properties": { "id": { @@ -280,6 +281,10 @@ }, "includeWatermark": { "type": "boolean" + }, + "userFacingErrorMessage": { + "type": "string", + "nullable": true } } }, diff --git a/core/openapi-full.json b/core/openapi-full.json index b5bf508a701c8..ae829249c31fc 100644 --- a/core/openapi-full.json +++ b/core/openapi-full.json @@ -663,7 +663,8 @@ "startedAt", "endedAt", "allowCleanup", - "includeWatermark" + "includeWatermark", + "userFacingErrorMessage" ], "properties": { "id": { @@ -740,6 +741,10 @@ }, "includeWatermark": { "type": "boolean" + }, + "userFacingErrorMessage": { + "type": "string", + "nullable": true } } }, diff --git a/core/openapi.json b/core/openapi.json index 19c0d9eb43b61..9c03e43bcfdcc 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -663,7 +663,8 @@ "startedAt", "endedAt", "allowCleanup", - "includeWatermark" + "includeWatermark", + "userFacingErrorMessage" ], "properties": { "id": { @@ -740,6 +741,10 @@ }, "includeWatermark": { "type": "boolean" + }, + "userFacingErrorMessage": { + "type": "string", + "nullable": true } } }, diff --git a/lib/public/TaskProcessing/Task.php b/lib/public/TaskProcessing/Task.php index a2899a1f1c977..f0096c42a7038 100644 --- a/lib/public/TaskProcessing/Task.php +++ b/lib/public/TaskProcessing/Task.php @@ -295,7 +295,7 @@ final public function setIncludeWatermark(bool $includeWatermark): void { } /** - * @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|numeric|string>, output: ?array|numeric|string>, customId: ?string, completionExpectedAt: ?int, progress: ?float, scheduledAt: ?int, startedAt: ?int, endedAt: ?int, allowCleanup: bool, includeWatermark: bool} + * @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|numeric|string>, output: ?array|numeric|string>, customId: ?string, completionExpectedAt: ?int, progress: ?float, scheduledAt: ?int, startedAt: ?int, endedAt: ?int, allowCleanup: bool, includeWatermark: bool, userFacingErrorMessage: ?string} * @since 30.0.0 */ final public function jsonSerialize(): array { @@ -316,6 +316,7 @@ final public function jsonSerialize(): array { 'endedAt' => $this->getEndedAt(), 'allowCleanup' => $this->getAllowCleanup(), 'includeWatermark' => $this->getIncludeWatermark(), + 'userFacingErrorMessage' => $this->getUserFacingErrorMessage(), ]; } diff --git a/openapi.json b/openapi.json index 5549bebf1f735..fc220c51fb415 100644 --- a/openapi.json +++ b/openapi.json @@ -709,7 +709,8 @@ "startedAt", "endedAt", "allowCleanup", - "includeWatermark" + "includeWatermark", + "userFacingErrorMessage" ], "properties": { "id": { @@ -786,6 +787,10 @@ }, "includeWatermark": { "type": "boolean" + }, + "userFacingErrorMessage": { + "type": "string", + "nullable": true } } },