PromucFlow_constructor/app/client/src/sagas
Rimil Dey 4094d49f06
fix: Sanitise toast error msgs (#22544)
## Description

Currently, the error messages in the toasts contain the names of the
errors (like Reference error, uncaught promise rejection error, etc.,).
These are unhelpful to users (especially if they are not programmers)
and do not convey any actionable feedback to the user who is trying to
fix and debug the app.

You can see it in action
[here](https://www.loom.com/share/e946f779dd1147f38eec1588a84821b2).

This PR aims to remove the names of these errors from the toast messages
so that the action to fix them can be highlighted. We are retaining the
names of the errors for the console, so that programmers using the
console, can get a full context of the error.

Fixes #22318

Media

Previous behavior -
https://www.loom.com/share/e946f779dd1147f38eec1588a84821b2

Current behavior -
https://www.loom.com/share/83fd8d08ed114f8b830acadb9894e4b1


## Type of change

- Bug fix (non-breaking change which fixes an issue)


## How Has This Been Tested?

- Manual
- Jest
- Cypress

### Test Plan
- Reference error check
- Uncaught promise rejection check

### Issues raised during DP testing
- none

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer-reviewed by QA
- [x] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [x] Added Test Plan Approved label after reviewing all Cypress test
2023-05-31 12:14:07 +05:30
..
__tests__ chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
ActionExecution fix: Sanitise toast error msgs (#22544) 2023-05-31 12:14:07 +05:30
autoHeightSagas feat: Expand auto height implementation to handle auto height use cases. (#22974) 2023-05-11 10:15:14 +05:30
CanvasSagas feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
WebsocketSagas feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
ActionSagas.ts fix: api url dynamic bindings (#23696) 2023-05-26 15:43:18 +05:30
ApiPaneSagas.ts fix: api url dynamic bindings (#23696) 2023-05-26 15:43:18 +05:30
AppThemingSaga.tsx feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
AutoLayoutUpdateSagas.tsx feat: Expand auto height implementation to handle auto height use cases. (#22974) 2023-05-11 10:15:14 +05:30
BatchSagas.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
CollectionSagas.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
ContextSwitchingSaga.ts chore: Removing feature flag for app level invites (#22650) 2023-04-26 12:48:16 +05:30
CurlImportSagas.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
DatasourcesSagas.ts chore: intercom trigger added for gsheets auth failure (#23664) 2023-05-30 17:19:35 +05:30
DebuggerSagas.ts chore: Add errorId to DEBUGGER_NEW_ERROR_MESSAGE telemetry (#22542) 2023-04-19 23:42:18 +05:30
editorContextSagas.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
ErrorSagas.tsx chore: Send default environmentId in header of all api call (#23745) 2023-05-26 15:22:20 +05:30
EvaluationsSaga.ts fix: Sanitise toast error msgs (#22544) 2023-05-31 12:14:07 +05:30
EvalWorkerActionSagas.ts feat: JSObject variable as a state (JSObject variable mutation) (#19926) 2023-04-07 13:11:36 +05:30
FormEvaluationSaga.ts feat: Bundle optimization and first load improvements (#21667) 2023-05-11 10:56:03 +05:30
GitSyncSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
GlobalSearchSagas.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
helper.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
InitSagas.ts fix: 503 error fixed when navigating to homepage (#21971) 2023-04-14 08:19:43 +05:30
JSActionSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
JSLibrarySaga.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
JSPaneSagas.ts fix: Sanitise toast error msgs (#22544) 2023-05-31 12:14:07 +05:30
layoutConversionSagas.ts fix: conversion of app with pages imported from templates and adjust height for blank container (#23404) 2023-05-25 17:50:08 +05:30
LintingSagas.ts feat: show lint errors in async functions bound to sync fields (#21187) 2023-04-03 16:11:15 +05:30
ModalSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
OnboardingSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
OneClickBindingSaga.ts chore: [one click binding] Property pane control to generate query for a widget (#22172) 2023-04-13 16:39:24 +05:30
PageSagas.tsx chore: Send orgId and instanceId on page create analytic events (#23489) 2023-05-29 18:05:38 +05:30
PageVisibilitySagas.ts feat: Bundle optimization and first load improvements (#21667) 2023-05-11 10:56:03 +05:30
PluginSagas.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
PostEvaluationSagas.ts fix: Sanitise toast error msgs (#22544) 2023-05-31 12:14:07 +05:30
PostLintingSagas.ts feat: show lint errors in async functions bound to sync fields (#21187) 2023-04-03 16:11:15 +05:30
ProvidersSaga.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
QueryPaneSagas.ts chore: events added for apis/queries (#23454) 2023-05-22 17:41:02 +05:30
RecentEntitiesSagas.ts chore: code splitting changes for appsmith ai v0.1 (#22521) 2023-04-20 20:42:35 +05:30
ReplaySaga.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
SaaSPaneSagas.ts fix: fix redirect post datasource save (#23707) 2023-05-26 13:39:07 +07:00
selectors.tsx feat: Expand auto height implementation to handle auto height use cases. (#22974) 2023-05-11 10:15:14 +05:30
SnapshotSagas.ts fix: widget columns to have integers after conversion to fixed layout and redirect to home page while restoring if the page does not exist in the restored snapshot (#23144) 2023-05-14 22:40:20 +05:30
SnipingModeSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
TemplatesSagas.ts fix: conversion of app with pages imported from templates and adjust height for blank container (#23404) 2023-05-25 17:50:08 +05:30
ThemeSaga.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
UtilSagas.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
WidgetAdditionSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
WidgetBlueprintSagas.test.ts fix: List widget issues in Auto Layout (#23252) 2023-05-29 10:06:19 +05:30
WidgetBlueprintSagas.ts fix: List widget issues in Auto Layout (#23252) 2023-05-29 10:06:19 +05:30
WidgetDeletionSagas.ts feat: Expand auto height implementation to handle auto height use cases. (#22974) 2023-05-11 10:15:14 +05:30
WidgetEnhancementHelpers.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
WidgetLoadingSaga.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
WidgetOperationSaga.test.tsx feat: upgrade to create react app 5 (#14000) 2022-06-21 19:27:34 +05:30
WidgetOperationSagas.tsx feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
WidgetOperationUtils.test.ts fix: combineDynamicBindings function (#22600) 2023-04-26 23:58:17 +05:30
WidgetOperationUtils.ts fix: Remove excess padding on right side and fix widget drop in nested containers (#22533) 2023-04-26 13:39:11 -04:00
WidgetSelectionSagas.ts fix: Do not set widget ancestry if selection happens via canvas (#22069) 2023-04-10 12:55:14 +05:30
WidgetSelectUtils.test.ts chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
WidgetSelectUtils.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30