Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trang này mô tả các phương pháp hay nhất để viết thông báo lỗi có thể hành động, cho người dùng biết cách khắc phục vấn đề để họ có thể hoàn thành mục tiêu.
Khi người dùng tương tác với một ứng dụng Google Chat, việc gặp phải thông báo lỗi có thể gây khó chịu nếu lỗi đó không thể xử lý.
Ví dụ: thông báo lỗi An error occurred không hữu ích vì thông báo này không giải thích vấn đề, cách người dùng có thể khắc phục vấn đề hoặc cách người dùng có thể nhận được trợ giúp. Trang này mô tả cách cấu trúc thông báo lỗi để thông báo đó hữu ích cho người dùng bằng cách cho thấy các ví dụ có thể hành động và không thể hành động.
Cấu trúc thông báo lỗi
Thông báo lỗi có thể xử lý có cấu trúc như sau:
Đã xảy ra lỗi. Việc cho biết lý do khiến ứng dụng Chat không thể hoàn tất một yêu cầu sẽ giúp người dùng giải quyết vấn đề. Việc giải thích lý do xảy ra lỗi sẽ giúp xây dựng lòng tin.
Cách người dùng có thể tiến tới mục tiêu của mình. Chỉ nói về những điều sai trái là chưa đủ. Cho người dùng biết cách họ có thể khắc phục lỗi và hoàn thành mục tiêu.
Cách yêu cầu trợ giúp. Nếu người dùng vẫn gặp vấn đề, hãy cho họ biết cách họ có thể được trợ giúp thêm. Đây có thể là lệnh /help hoặc đường liên kết đến tài liệu cho ứng dụng Chat của bạn.
Ví dụ về thông báo lỗi: định dạng ngày không chính xác
Trong ví dụ này, người dùng đã nhập ngày ở định dạng mà ứng dụng Chat không mong đợi. Họ đã viết November 19, 2021, nhưng ứng dụng Chat lại mong đợi 2021-11-19.
Dưới đây là phiên bản có thể thực hiện và không thể thực hiện của thông báo lỗi mà ứng dụng Chat phản hồi:
Lỗi có thể xử lý
Một người dùng yêu cầu ứng dụng Chat lên lịch cuộc họp với một người khác. Ứng dụng Chat sẽ phản hồi bằng một thông báo lỗi hữu ích và có thể thực hiện hành động:
I don't recognize the date format you entered. Write dates as `yyyy-mm-dd`; for example, `2000-01-31`. For help, type `/help`.
Bạn có thể thực hiện hành động đối với thông báo lỗi này vì những lý do sau:
Cho biết vấn đề đã xảy ra. Ứng dụng Chat không nhận dạng được định dạng ngày.
Giải thích cách khắc phục lỗi bằng cách cho người dùng biết định dạng ngày dự kiến và đưa ra một ví dụ về ngày để giúp mọi người hiểu được những gì cần viết.
Cung cấp thêm thông tin trợ giúp bằng lệnh dấu gạch chéo /help. Nếu vẫn gặp khó khăn, người dùng sẽ biết cách tìm hiểu thêm.
Lỗi không thể khắc phục
Một người dùng yêu cầu ứng dụng Chat lên lịch cuộc họp với một người khác. Ứng dụng Chat phản hồi bằng một thông báo lỗi không hữu ích và không thể thực hiện hành động:
Enter the correct date format.
Bạn không thể làm gì khi gặp thông báo lỗi này vì những lý do sau:
Không cho biết liệu yêu cầu có lên lịch cuộc họp hay không. Người dùng có thể do dự khi lên lịch lại cuộc họp hoặc họ có thể cho rằng cuộc họp đã được lên lịch.
Không cho người dùng biết cách định dạng ngày. Thay vì giả định rằng người dùng biết cách định dạng ngày, bạn nên cho biết rằng ứng dụng đang chờ định dạng ngày yyyy-mm-dd.
Không hỗ trợ thêm. Khi gặp khó khăn và không biết cách tiếp tục, người dùng có thể ngừng nhắn tin cho ứng dụng Chat.
Dùng thử
Bây giờ bạn đã biết cách viết lỗi có thể xử lý, bạn có thể xác định trong tình huống sau đây lỗi nào trong số những lỗi này có thể xử lý:
Một ứng dụng Chat sẽ tạo sự kiện trên lịch khi người dùng nhắn tin cho ứng dụng Chat bằng từ khoá schedule. Để tạo sự kiện trên lịch, ứng dụng Chat yêu cầu người dùng xác thực. Nếu người dùng chưa được xác thực, thì ứng dụng Chat sẽ phản hồi bằng một thông báo lỗi.
Thông báo lỗi nào có thể xử lý?
Trước khi tôi có thể lên lịch cuộc họp, bạn phải đăng nhập bằng cách nhập /signin. Để tìm hiểu thêm, hãy nhập /help.
Bạn có thể xử lý thông báo lỗi này vì thông báo có nội dung như sau:
Đã xảy ra lỗi. Ứng dụng Chat yêu cầu xác thực.
Cách tiến hành. Nhập /signin để xác thực.
Cách nhận trợ giúp. Nếu muốn biết thêm thông tin, người dùng có thể nhập /help.
Bạn phải xác thực.
Bạn không thể làm gì với thông báo lỗi này vì thông báo không cho biết cách xác thực.
Đăng nhập.
Người dùng không thể làm gì khi thấy thông báo lỗi này vì thông báo không cho biết cách đăng nhập và ngụ ý rằng người dùng đã đăng xuất thay vì nói rõ điều đó, gây nhầm lẫn.
Không thể lên lịch họp.
Người dùng không thể làm gì khi gặp thông báo lỗi này vì thông báo không cho biết lý do không thể lên lịch cuộc họp hoặc cách người dùng có thể tiếp tục. Không có trợ giúp nào được cung cấp.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eGoogle Chat app error messages should be actionable, guiding users on how to resolve issues and proceed.\u003c/p\u003e\n"],["\u003cp\u003eActionable error messages clearly explain the problem, provide steps for fixing it, and offer additional help resources.\u003c/p\u003e\n"],["\u003cp\u003eInactionable error messages are vague, lack guidance, and can lead to user frustration and abandonment.\u003c/p\u003e\n"],["\u003cp\u003eUse the actionable error message structure: state the problem, guide the user on fixing it, and offer further help (e.g., \u003ccode\u003e/help\u003c/code\u003e command).\u003c/p\u003e\n"],["\u003cp\u003eWhen writing error messages, assume users need clear instructions and avoid ambiguity.\u003c/p\u003e\n"]]],["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"],null,["# Write actionable error messages\n\nThis page describes best practices to write actionable error messages that tell\nthe user how to fix the issue so that they can complete their goal.\n\nWhen a user is interacting with a Google Chat app, encountering\nerror messages can be a frustrating experience when the error isn't actionable.\nFor example, the error message, `An error occurred`, isn't useful because the\nmessage doesn't explain what went wrong, how the user can fix the issue, or how\nthe user can get help. This page describes how to structure error messages so\nthat they're useful to users by showing actionable and inactionable examples.\n\nError message structure\n-----------------------\n\nAn actionable error message has the following structure:\n\n- **What went wrong.** Saying why the Chat app can't complete a request helps the user resolve the issue. Explaining why an error occurred builds trust.\n- **How the user can proceed toward their goal.** It's never enough to just say what went wrong. Tell users how they can move past the error and complete their goal.\n- **How to get help.** If the user is still stuck, tell them how they can get more help. This could be a `/help` command or a link to documentation for your Chat app.\n\nExample error message: incorrect date format\n--------------------------------------------\n\nIn this example, the user entered a date in a format that\nthe Chat app didn't expect. They wrote\n`November 19, 2021`, but the Chat app expects\n`2021-11-19`.\n\nHere's an actionable and an inactionable version of the error message that the\nChat app responds with:\n\n#### Actionable error\n\nA user asks the Chat app to schedule a meeting with\nanother person. The Chat app responds with a good,\nactionable error message:\n\n``I don't recognize the date format you entered. Write dates as `yyyy-mm-dd`; for example, `2000-01-31`. For help, type `/help`.``\n\nThis error message is actionable for the following reasons:\n\n- Says what went wrong. The Chat app doesn't recognize the date format.\n- Explains how to fix the error by telling the user the expected date format and gives an example date that helps people understand what to write.\n- Offers more help with a `/help` slash command. If users are still stuck, they know how to learn more.\n\n#### Inactionable error\n\nA user asks the Chat app to schedule a meeting with\nanother person. The Chat app responds with an\nunhelpful, inactionable error message:\n\n`Enter the correct date format.`\n\nThis error message is inactionable for the following reasons:\n\n- Doesn't say whether it scheduled the meeting. The user might be hesitant to reschedule the meeting, or they might assume that the meeting was scheduled.\n- Doesn't tell the user how to format the date. Instead of assuming that users know how to format the date, it should say that it's expecting the date format `yyyy-mm-dd`.\n- Doesn't offer more help. When users are stuck and don't know how to proceed, they might stop messaging the Chat app.\n\nTry it out\n----------\n\nNow that you know how to write actionable errors, can you identify in the\nfollowing scenario which of these errors is actionable:\n\nA Chat app creates calendar events when users message\nthe Chat app with the keyword `schedule`. To\ncreate a calendar event, the Chat app requires user\nauthentication. If a user hasn't been authenticated, then the\nChat app responds with an error message. \nWhich error message is actionable? \nBefore I can schedule the meeting, you must sign in by typing `/signin`. To learn more, type `/help`. \nThis error message is actionable because it says the following:\n\n- What went wrong. The Chat app requires authentication.\n- How to proceed. Type `/signin` to authenticate.\n- How to get help. If the user wants more information, they can type `/help`. \nYou must authenticate. \nThis error message is inactionable because it doesn't say how to authenticate. \nSign in. \nThis error message is inactionable because it doesn't say how to sign in, and it implies that the user is signed out instead of clearly saying so, which is confusing. \nCan't schedule meeting. \nThis error message is inactionable because it doesn't tell the user why the meeting can't be scheduled or how the user can proceed. No help is provided."]]