Ghost/ghost/admin/app/services
Kevin Ansfield c24ea5d0bc Fixed raw JS error messages appearing in alerts (#2407)
refs https://github.com/TryGhost/Team/issues/1613

We use `notifications.showAPIError()` in many of our try/catch routines but those can also pick up standard JS errors which can result in ugly and useless messages showing in alerts.

- added a list of known built-in JS error type names to check against and a generic error message to be used in place of ones we know shouldn't be displayed
- in `showAPIError(obj)` check `obj.name` against the known list and swap the message for a generic one
  - only the message is swapped, we still log the full/original error to Sentry
- in `handleNotification(msg)` which is the final method used when displaying any alert/notification, extract all words in the supplied message and check that against the known list and swap the message on a match. This handles situations where the API might give us a raw JS error message in the message string
2022-05-27 11:52:39 +01:00
..
ajax.js Reverted Accept-Version header usage in Admin API communication 2022-04-06 10:12:09 +08:00
billing.js Collapsed @service injection definitions to single-line style 2022-02-03 19:04:43 +00:00
clock.js [chore] Ran native classes codemod for app/services (#2240) 2022-02-02 22:11:11 +00:00
config.js Collapsed @service injection definitions to single-line style 2022-02-03 19:04:43 +00:00
custom-theme-settings.js Dropped ember-concurrency-decorators dependency 2022-02-09 10:49:38 +00:00
custom-views.js Resolved deprecation warnings for dynamic modal component binding (#2303) 2022-03-14 10:52:04 +00:00
dashboard-mocks.js Fixed usage of nullish coalescing in dashboard mocking (missing file) 2022-05-18 10:54:50 +02:00
dashboard-stats.js 🐛 Fixed unreliable paid members enabled checks (#2405) 2022-05-24 16:53:03 +02:00
data-cache.js Added data-cache service for managing limited-lifetime cached data 2022-01-21 18:15:06 +00:00
dropdown.js [chore] Ran native classes codemod for app/services (#2240) 2022-02-02 22:11:11 +00:00
event-bus.js [chore] Ran native classes codemod for app/services (#2240) 2022-02-02 22:11:11 +00:00
feature.js Removed tweetGridCard feature flag 2022-05-25 13:52:57 +02:00
frontend.js Ran ember-cli-update --run-codemods (#2219) 2022-01-21 19:25:47 +00:00
ghost-paths.js [chore] Ran native classes codemod for app/services (#2240) 2022-02-02 22:11:11 +00:00
lazy-loader.js Collapsed @service injection definitions to single-line style 2022-02-03 19:04:43 +00:00
limit.js Implemented newsletter limits 2022-05-11 12:10:26 +02:00
media-queries.js [chore] Ran native classes codemod for app/services (#2240) 2022-02-02 22:11:11 +00:00
media.js [chore] Ran native classes codemod for app/services (#2240) 2022-02-02 22:11:11 +00:00
member-import-validator.js Collapsed @service injection definitions to single-line style 2022-02-03 19:04:43 +00:00
members-count-cache.js Fixed "memberssubscribers" text in editor status for scheduled posts 2022-05-18 10:55:31 +01:00
members-stats.js Dropped ember-concurrency-decorators dependency 2022-02-09 10:49:38 +00:00
members-utils.js 🐛 Fixed unreliable paid members enabled checks (#2405) 2022-05-24 16:53:03 +02:00
modals.js Fixed error from backdrop click handler for modals without options 2022-04-21 11:41:45 +01:00
navigation.js Ran ember-cli-update --run-codemods (#2219) 2022-01-21 19:25:47 +00:00
notifications.js Fixed raw JS error messages appearing in alerts (#2407) 2022-05-27 11:52:39 +01:00
resize-detector.js Migrated <GhUnsplash> to glimmer component 2022-02-07 16:53:12 +00:00
session.js Improved authentication timing in setup flow 2022-03-10 11:53:37 +00:00
settings.js Removed oauth experiment (#2390) 2022-05-16 17:37:00 +01:00
slug-generator.js Collapsed @service injection definitions to single-line style 2022-02-03 19:04:43 +00:00
tenor.js Dropped ember-concurrency-decorators dependency 2022-02-09 10:49:38 +00:00
theme-management.js [chore] migrate to eslint@8 and run --fix (#2256) 2022-02-10 10:41:36 +00:00
ui.js Ran ember-cli-update --run-codemods (#2219) 2022-01-21 19:25:47 +00:00
unsplash.js Fixed multiple no-shadow linting errors 2020-06-17 09:35:46 +01:00
upgrade-status.js Collapsed @service injection definitions to single-line style 2022-02-03 19:04:43 +00:00
utils.js Added utils service with downloadFile() method 2021-10-05 14:21:19 +01:00
whats-new.js Ran ember-cli-update --run-codemods (#2219) 2022-01-21 19:25:47 +00:00