justicenation / slashclock

/clock concept as a new Slack app
GNU General Public License v3.0
0 stars 0 forks source link

Alert product owner on 500_service_error #19

Closed martyychang closed 6 years ago

martyychang commented 6 years ago

Darn - that slash command didn't work (error message: 500_service_error). Manage the command at /clock.

As a product owner, I want to make sure I am proactively notified (or at least be able to run daily reports) of any HTTP 500 errors encountered by users who are using the product, so I can promptly resolve bugs and manage customer satisfaction.

martyychang commented 6 years ago

Let's start with an email alert. If an email alert works, I feel confident that a report can be built off the data that caused the email alert to be sent.

martyychang commented 6 years ago

Sadly doesn't look like an exception can be consistently serialized by default to be stored in a long text field. The code below causes error, "System.JSONException: Apex Type unsupported in JSON: System.MathException"

try {
    Integer div0 = 1 / 0;
}
catch (System.Exception caught) {
    System.debug(JSON.serialize(caught));
}
martyychang commented 6 years ago

Actually, to keep things simple I just created a Slash Command Unknown Errors This Week report and subscribed to it. No need to create any additional workflow rules or email alerts to meet the need of this story.

martyychang commented 6 years ago

Resolved by #35

martyychang commented 6 years ago

I think this works well enough that I'm not going to bother with #33 or #34 for the first release. The user is directed to /clock help, after which they can pull up the appropriate documentation.