Skip to content

Conversation

marcelklehr
Copy link
Member

Summary

Currently the task processing API only had internal error messages that are not safe to show to the user. This PR extends it so that providers can also set user-facing error messages.

Checklist

@marcelklehr marcelklehr added this to the Nextcloud 33 milestone Oct 13, 2025
@marcelklehr marcelklehr added the 3. to review Waiting for reviews label Oct 13, 2025
* @throws Exception If the query failed
* @throws NotFoundException If the task could not be found
* @since 30.0.0
* @aince 33.0.0 Added `userFacingError` parameter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @aince 33.0.0 Added `userFacingError` parameter
* @since 33.0.0 Added `userFacingError` parameter

Comment on lines +1102 to +1103
// truncate error message to 1000 characters
$task->setUserFacingErrorMessage(mb_substr($userFacingError, 0, 1000));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the db max length says 4000. I don't remember but was it because of the multibyte string partition?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we usually use utf8_mb4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants