Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Editor load errors display raw exception text to users

Aperta
#604 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, ios, kotlin, swift
Ambito
frontend, mobile

Direzione di ricerca

Inizia da displayError in ios/Sources/GutenbergKit/Sources/EditorViewController.swift e da EditorErrorView/showErrorPhase in android/Gutenberg/src/main/java/org/wordpress/gutenberg/GutenbergView.kt. Esamina le righe 85–88 di EditorHttpClient.kt e la relazione con l’EditorLoadFailure tipizzato proposto in #603. Il lavoro è completato quando entrambe le piattaforme mostrano messaggi di auth o ritentabili appropriati per l’utente, mentre i dettagli grezzi restano disponibili per i log e la telemetria.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

[Type] Bug Android iOS

Description

When the editor fails to load, both platforms render the underlying exception message directly in the library's error view. These strings are written for developers, and they reach users of both production apps.

Examples seen in testing:

  • iOS: No route was found matching the URL and request method.
  • Android: rest_no_route: No route was found matching the URL and request method.
  • Android: Unknown error with status code: 500
  • Android: Failed to load editor; unable to resolve host…

Android additionally prefixes the machine-readable WP error code, because WPErrorResponse.message is built as "${error.code}: ${error.message}" (EditorHttpClient.kt#L85-L88).

This is not demo-only

The error views live in the library, and neither host app can override them:

  • iOS: displayError renders error.localizedDescription (EditorViewController.swift#L1015-L1025). didFailToLoad is documented as firing after the error is displayed, and WP-iOS's implementation is analytics-only.
  • Android: GutenbergView owns EditorErrorView and calls showErrorPhase directly (GutenbergView.kt#L373-L384). WP-Android embeds GutenbergView and inherits the view as-is.

Proposed change

  • Map failure classes to user-appropriate copy rather than echoing exception text
  • Auth failures: something actionable, e.g. "Sign in again to continue editing"
  • Server/network failures: a generic retryable message
  • Keep the raw error for logs and telemetry, not the UI
  • Android: stop prefixing the WP error code in user-visible text
  • Consider a retry affordance where the failure is retryable

Notes

  • #602 removes the rest_no_route message from this view entirely, and #603 removes most transient 5xx cases under automatic fallback. What remains — auth failures, and everything under disabled fallback — still needs real copy, so this is worth doing independently and is lower priority than both.
  • Pairs naturally with the typed EditorLoadFailure proposed in #603: the classification that drives host behavior can also drive the message.
Lingua principale
JavaScript
Stelle
29
Fork
7
Merge medio
3g 3h
PR unite (30g)
91

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wordpress-mobile/GutenbergKit

Tutte le issue di wordpress-mobile/GutenbergKit

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.