Skip to content

fix: Show trigger errors in the debugger with widget and property name#6970

Merged
akash-codemonk merged 28 commits into
releasefrom
fix/pointed-trigger-errors
Sep 15, 2021
Merged

fix: Show trigger errors in the debugger with widget and property name#6970
akash-codemonk merged 28 commits into
releasefrom
fix/pointed-trigger-errors

Conversation

@akash-codemonk

@akash-codemonk akash-codemonk commented Aug 30, 2021

Copy link
Copy Markdown
Contributor

Description

Fixes #6340
Fixes #6339

Errors are shown are in the errors tab of the debugger when there is an error on trigger. The error in the debugger gets cleared once the same is triggered succesfully.

Type of change

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

How Has This Been Tested?

Cypress test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • 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

Test coverage results 🧪

🔴 Total coverage has decreased
// Code coverage diff between base branch:release and head branch: fix/pointed-trigger-errors 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 54.86 (-0.02) 36.81 (-0.08) 34.23 (0) 55.38 (-0.02)
🟢 app/client/src/components/ads/Toast.tsx 78.72 (0.46) 62.5 (1.39) 88.24 (0) 78.72 (0.46)
🔴 app/client/src/constants/messages.ts 75.04 (-0.03) 100 (0) 25.59 (-0.07) 81.23 (-0.12)
🔴 app/client/src/sagas/DebuggerSagas.ts 14.58 (-1.06) 4.17 (-0.35) 16.67 (-0.98) 16.28 (-1.11)
🟢 app/client/src/sagas/PostEvaluationSagas.ts 17.73 (0.25) 0 (0) 0 (0) 21.74 (0.37)
🟢 app/client/src/sagas/ActionExecution/ActionExecutionSagas.ts 32.97 (4.22) 1.56 (-1.22) 28.57 (0) 32.18 (4.55)
🔴 app/client/src/sagas/ActionExecution/PromiseActionSaga.ts 29.27 (-3.29) 0 (0) 33.33 (0) 23.53 (-4.25)
🔴 app/client/src/selectors/commentsSelectors.ts 78.23 (-1.61) 54.41 (-2.94) 70 (0) 84.09 (-2.27)
🔴 app/client/src/utils/autocomplete/TernServer.ts 50.47 (-0.24) 38.26 (-0.87) 36.21 (0) 55.08 (-0.27)

rishabhsaxena
rishabhsaxena previously approved these changes Aug 30, 2021
Comment thread app/client/src/sagas/PostEvaluationSagas.ts
Comment thread app/client/src/sagas/ActionExecution/ActionExecutionSagas.ts
- Remove unnecassary call to add error
- Show better error messages when present
@akash-codemonk
akash-codemonk marked this pull request as draft September 1, 2021 04:46
@akash-codemonk
akash-codemonk marked this pull request as ready for review September 1, 2021 10:43
rishabhsaxena
rishabhsaxena previously approved these changes Sep 1, 2021
Comment thread app/client/src/sagas/DebuggerSagas.ts Outdated
Comment thread app/client/src/sagas/ActionExecution/PluginActionSaga.ts Outdated
Comment thread app/client/src/sagas/ActionExecution/PromiseActionSaga.ts
rishabhsaxena
rishabhsaxena previously approved these changes Sep 13, 2021

@rishabhsaxena rishabhsaxena left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of queries, rest LGTM

Comment thread app/client/src/sagas/ActionExecution/ActionExecutionSagas.ts
Comment thread app/client/src/sagas/ActionExecution/PromiseActionSaga.ts Outdated
Comment thread app/client/src/sagas/ActionExecution/PromiseActionSaga.ts Outdated
@rishabhsaxena

Copy link
Copy Markdown
Contributor

Also a minor point: should we show the value along with the error in the errors tab? This could be an enhancement

@akash-codemonk

Copy link
Copy Markdown
Contributor Author

Also a minor point: should we show the value along with the error in the errors tab? This could be an enhancement

Not sure this would be helpful as these are for trigger fields and these have function calls, so there is no resulting evaluated value of the field. So what could be shown is the code in the field itself.

rishabhsaxena
rishabhsaxena previously approved these changes Sep 14, 2021
@akash-codemonk
akash-codemonk merged commit e9fe54f into release Sep 15, 2021
@akash-codemonk
akash-codemonk deleted the fix/pointed-trigger-errors branch September 15, 2021 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Error reporting: Make errors more pointed [Feature] Debugger: Log trigger errors in the debugger

2 participants