Skip to content

Commit

Permalink
Merge pull request #33766 from dimagi/rc/user-friendly-case-search-500
Browse files Browse the repository at this point in the history
make 500 more user friendly
  • Loading branch information
Robert-Costello authored Nov 17, 2023
2 parents 7bb53cf + fdf16b5 commit fa8be9d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions corehq/apps/cloudcare/static/cloudcare/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ hqDefine('cloudcare/js/utils', [

var showError = function (message, $el, reportToHq) {
message = getErrorMessage(message);
// Make message more user friendly since html isn't useful here
if (message.includes('500') && message.includes('<!DOCTYPE html>')) {
message = 'Sorry, something went wrong. Please try again in a few minutes. ' +
'If this problem persists, please report it to CommCare Support.';
}
_show(message, $el, null, "alert alert-danger");
if (reportToHq === undefined || reportToHq) {
reportFormplayerErrorToHQ({
Expand Down

0 comments on commit fa8be9d

Please sign in to comment.