Skip to content

feat(error-content): Show errors in plain language with the raw text kept - #313

Merged
yahyafakhroji merged 2 commits into
mainfrom
feat/plain-language-errors
Nov 18, 2026
Merged

yahyafakhroji merged 2 commits into
mainfrom
feat/plain-language-errors

Conversation

@yahyafakhroji

Copy link
Copy Markdown
Contributor

Problem
datum-ui showed errors raw or not at all. A failed DataTable.Server load read "No results." with no way to retry. TaskQueue's summary showed raw Kubernetes errors such as permission denials. Dropzone passed react-dropzone's developer text, and only for the first rejected file. Each portal would have had to build #722's plain-English errors on its own.

Solution
A new @datum-cloud/datum-ui/error-content entry point adds describeApiError, which turns common Kubernetes errors into a plain headline and keeps the raw text. It also adds an ErrorContent component that shows the error with a collapsed "Error details", and ErrorDescriptionProvider so an app can change the wording or name product areas. Server tables now show the error with Retry through a new refetch(). TaskQueue translates thrown errors and shows the raw text in its summary. Dropzone explains each rejected file. Cloud-portal's table wrapper keeps rendering its own error, and messages already written for people keep their wording.

Closes #311
Ref: datum-cloud/enhancements#722

@yahyafakhroji
yahyafakhroji requested a review from a team as a code owner November 18, 2026 14:20
@yahyafakhroji yahyafakhroji added the enhancement New feature or request label Nov 18, 2026
@yahyafakhroji yahyafakhroji self-assigned this Nov 18, 2026
datum-ui showed errors raw or not at all: a failed DataTable.Server load
read "No results." with no way to retry, and each portal would have had
to build plain-English errors on its own. A new error-content entry
point adds describeApiError, which turns common Kubernetes errors into a
plain headline and keeps the raw text, ErrorContent to show it with a
collapsed Error details section, and ErrorDescriptionProvider so an app
can change the wording or name product areas. Server tables now show
the error with Retry through a new refetch(), and errorContent lets an
app replace it.
TaskQueue's summary showed whatever a processor threw, and Dropzone
passed react-dropzone's developer text for only the first rejected file.
TaskQueue now describes thrown errors, for a whole task or one item,
with the app's error describer or a formatError option, and shows the
raw text under Error details. Text passed to ctx.fail stays as written.
Dropzone explains each rejected file in a sentence, passes them all to
onError and adds onReject.
@yahyafakhroji
yahyafakhroji marked this pull request as draft November 18, 2026 14:40
@yahyafakhroji
yahyafakhroji force-pushed the feat/plain-language-errors branch from 96427d7 to 05c030e Compare November 18, 2026 14:40
@yahyafakhroji
yahyafakhroji marked this pull request as ready for review November 18, 2026 14:40
@yahyafakhroji
yahyafakhroji merged commit 23e8afc into main Nov 18, 2026
9 checks passed
@yahyafakhroji
yahyafakhroji deleted the feat/plain-language-errors branch November 18, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show load errors and plain-language error messages

2 participants