كتابة رسائل خطأ قابلة للتنفيذ
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توضّح هذه الصفحة أفضل الممارسات لكتابة رسائل خطأ قابلة للتنفيذ توضّح للمستخدم كيفية حلّ المشكلة ليتمكّن من إكمال هدفه.
عندما يتفاعل مستخدم مع تطبيق 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.
جرّبه الآن
بعد أن تعرّفت على كيفية كتابة رسائل خطأ قابلة للتنفيذ، هل يمكنك تحديد رسالة الخطأ القابلة للتنفيذ في السيناريو التالي:
ينشئ تطبيق Chat أحداثًا في التقويم عندما يرسل المستخدمون رسالة إلى تطبيق Chat تتضمّن الكلمة الرئيسية schedule
. لإنشاء حدث تقويم، يتطلّب تطبيق Chat مصادقة المستخدم. إذا لم تتم مصادقة المستخدم، سيردّ تطبيق Chat برسالة خطأ.
ما هي رسالة الخطأ التي يمكن اتّخاذ إجراء بشأنها؟
قبل أن أتمكّن من جدولة الاجتماع، عليك تسجيل الدخول عن طريق كتابة
/signin
. لمزيد من المعلومات، اكتب /help
.
يمكن اتّخاذ إجراء بشأن رسالة الخطأ هذه لأنّها تتضمّن ما يلي:
- ما حدث من خطأ يتطلّب تطبيق Chat المصادقة.
- كيفية المتابعة اكتب
/signin
للمصادقة.
- كيفية الحصول على المساعدة إذا أراد المستخدم الحصول على مزيد من المعلومات، يمكنه كتابة
/help
.
يجب إثبات ملكية الحساب.
رسالة الخطأ هذه غير قابلة للتنفيذ لأنّها لا توضّح كيفية المصادقة.
سجِّل الدخول.
رسالة الخطأ هذه غير قابلة للتنفيذ لأنّها لا توضّح كيفية تسجيل الدخول، كما أنّها تشير إلى أنّ المستخدم مسجّل الخروج بدلاً من توضيح ذلك بشكل مباشر، ما يسبّب إرباكًا.
لا يمكن تحديد موعد للاجتماع.
رسالة الخطأ هذه غير قابلة للتنفيذ لأنّها لا توضّح للمستخدم سبب عدم إمكانية جدولة الاجتماع أو كيفية المتابعة. لم يتم تقديم أي مساعدة.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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."]]