撰寫可採取行動的錯誤訊息
本頁說明撰寫可操作錯誤訊息的最佳做法,讓使用者瞭解如何修正問題,以便完成目標。
使用者與 Google Chat 應用程式互動時,如果遇到無法採取行動的錯誤訊息,可能會感到沮喪。舉例來說,錯誤訊息 An error occurred
並不實用,因為該訊息並未說明發生錯誤的原因、使用者如何修正問題,或使用者如何取得協助。本頁面說明如何建構錯誤訊息,讓使用者看到可採取和不可採取的範例,以便提供實用的資訊。
錯誤訊息結構
可採取行動的錯誤訊息結構如下:
- 發生錯誤:說明 Chat 應用程式無法完成要求的原因,有助使用者解決問題。說明發生錯誤的原因可建立信任感。
- 使用者如何朝目標前進。只說出錯誤所在是不夠的。告訴使用者如何克服錯誤並完成目標。
- 如何取得協助。如果使用者仍無法解決問題,請告訴他們如何取得更多協助。這可以是
/help
指令,或 Chat 應用程式說明文件的連結。
在這個例子中,使用者輸入的日期格式並非 Chat 應用程式預期的格式。他們寫的是 November 19, 2021
,但 Chat 應用程式預期的是 2021-11-19
。
以下是 Chat 應用程式回應的錯誤訊息,其中一個可採取行動,另一個則無法採取行動:
可採取行動的錯誤
使用者要求 Chat 應用程式安排與其他使用者的會議。Chat 應用程式會回應可採取行動的錯誤訊息:
I don't recognize the date format you entered. Write dates as `yyyy-mm-dd`; for example, `2000-01-31`. For help, type `/help`.
您可以採取以下行動來解決這個錯誤訊息:
- 說明發生的問題。Chat 應用程式無法辨識日期格式。
- 說明如何修正錯誤,方法是告訴使用者預期的日期格式,並提供日期範例,協助使用者瞭解應輸入的內容。
- 提供更多
/help
斜線指令的說明。如果使用者仍無法解決問題,他們可以瞭解如何進一步瞭解。
無法採取行動的錯誤
使用者要求 Chat 應用程式安排與其他使用者的會議。Chat 應用程式會回應無用且無法採取行動的錯誤訊息:
Enter the correct date format.
這個錯誤訊息無法採取行動,原因如下:
- 未說明是否已排定會議。使用者可能不願重新安排會議,或是認為會議已排定。
- 未告知使用者如何格式化日期。不要假設使用者知道如何格式化日期,而是應說明預期的日期格式為
yyyy-mm-dd
。
- 不會提供更多協助。如果使用者遇到問題,不知道如何繼續操作,可能就會停止傳送訊息給 Chat 應用程式。
立即試用
您現在已瞭解如何編寫可採取行動的錯誤,請問在下列情境中,哪些錯誤可採取行動:
當使用者傳送含有關鍵字 schedule
的訊息給 Chat 應用程式時,Chat 應用程式會建立日曆活動。如要建立日曆活動,Chat 應用程式需要使用者驗證。如果使用者尚未完成驗證,Chat 應用程式會回應錯誤訊息。
哪個錯誤訊息可供操作?
您必須輸入 /signin
才能登入,我才能安排會議。如要瞭解詳情,請輸入 /help
。
這個錯誤訊息可採取行動,因為它會顯示以下訊息:
- 發生錯誤的情況。Chat 應用程式需要驗證。
- 如何繼續操作。輸入
/signin
即可驗證。
- 如何取得協助。如果使用者想瞭解更多資訊,可以輸入
/help
。
無法排定會議時間。
這個錯誤訊息無法採取行動,因為它不會告知使用者為何無法安排會議,或使用者如何繼續操作。未提供任何說明。
您必須進行驗證。
這則錯誤訊息無法採取行動,因為它沒有說明如何驗證。
登入。
這則錯誤訊息無法採取行動,因為它沒有說明如何登入,而且暗示使用者已登出,但並未明確指出,這會讓使用者感到困惑。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-16 (世界標準時間)。
[null,null,["上次更新時間:2025-02-16 (世界標準時間)。"],[[["Google Chat app error messages should be actionable, guiding users on how to resolve issues and proceed."],["Actionable error messages clearly explain the problem, provide steps for fixing it, and offer additional help resources."],["Inactionable error messages are vague, lack guidance, and can lead to user frustration and abandonment."],["Use the actionable error message structure: state the problem, guide the user on fixing it, and offer further help (e.g., `/help` command)."],["When writing error messages, assume users need clear instructions and avoid ambiguity."]]],["Actionable error messages in Google Chat apps should specify what went wrong, how to fix it, and how to get further assistance. For example, an actionable message for an incorrect date format would state that the format is unrecognized, specify the required format (yyyy-mm-dd), and provide a /help command. In contrast, inactionable errors are vague, omit how to correct the issue, and offer no additional support. A sign-in error should also include clear instructions, and help commands.\n"]]