fix(studio): editor — friendly-error mapping for run failures
Some checks failed
Security / Security check (push) Failing after 1s
Some checks failed
Security / Security check (push) Failing after 1s
Previously a failed runSavedFlow dumped the raw exception into FaiErrorBox in the right panel. Hub gRPC failures (network, missing module, schema reject, …) are now mapped through friendlyError so the operator sees a one-sentence headline + optional recovery hint, with the verbatim error still accessible behind FaiErrorBox's expand-on-tap. Matches the same pattern already used by every other Studio page that surfaces a hub error. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
c3f9f862ab
commit
647d93a1dc
1 changed files with 35 additions and 3 deletions
|
|
@ -639,9 +639,41 @@ class _RunResult extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: FaiSpace.sm),
|
const SizedBox(height: FaiSpace.sm),
|
||||||
if (running) const LinearProgressIndicator(),
|
if (running) const LinearProgressIndicator(),
|
||||||
if (error != null)
|
if (error != null) ...[
|
||||||
FaiErrorBox(error: error, isError: true)
|
// Map raw exceptions through friendlyError so the
|
||||||
else if (outputs != null)
|
// operator sees a sentence + a recovery hint
|
||||||
|
// instead of a stack trace. The verbatim error
|
||||||
|
// stays accessible via FaiErrorBox's expand-on-tap.
|
||||||
|
Builder(
|
||||||
|
builder: (ctx) {
|
||||||
|
final fe = friendlyError(error!, l);
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
fe.headline,
|
||||||
|
style: Theme.of(ctx).textTheme.bodyMedium?.copyWith(
|
||||||
|
color: Theme.of(ctx).colorScheme.error,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (fe.hint != null) ...[
|
||||||
|
const SizedBox(height: FaiSpace.xs),
|
||||||
|
Text(
|
||||||
|
fe.hint!,
|
||||||
|
style: Theme.of(ctx).textTheme.bodySmall,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
const SizedBox(height: FaiSpace.sm),
|
||||||
|
FaiErrorBox(
|
||||||
|
error: fe.detail,
|
||||||
|
isError: true,
|
||||||
|
maxHeight: 200,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
] else if (outputs != null)
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue