fix(studio): show real download error, not 'hub not reachable'
friendlyError now pattern-matches module-download failures ('download
failed: ...') and renders a clear, copyable headline + the URL/status
detail, instead of letting the gRPC-Unavailable default show the generic
'hub not reachable' banner. EN+DE l10n.
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
c9fa068991
commit
657e68efee
6 changed files with 43 additions and 0 deletions
|
|
@ -122,6 +122,19 @@ FriendlyError friendlyError(Object error, AppLocalizations l) {
|
|||
FriendlyError? _matchHubPattern(String detail, AppLocalizations l) {
|
||||
if (detail.isEmpty) return null;
|
||||
|
||||
// Module bundle download failed (bad / unhosted URL). The hub wraps
|
||||
// these as "download failed: ..." and (older builds) mapped them to
|
||||
// gRPC Unavailable — which the code-default would render as the
|
||||
// misleading "hub not reachable". The hub is fine; show the real URL
|
||||
// + status (carried in `detail`) under a clear headline.
|
||||
if (detail.contains('download failed') || detail.contains('download error')) {
|
||||
return FriendlyError(
|
||||
headline: l.errModuleDownload,
|
||||
detail: detail,
|
||||
hint: l.errModuleDownloadHint,
|
||||
);
|
||||
}
|
||||
|
||||
// Approval rejected: "step 'X' rejected by Y: reason"
|
||||
if (detail.contains('rejected by')) {
|
||||
return FriendlyError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue