-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error message display issue in dev tool console #3652
Conversation
Signed-off-by: Su <szhongna@amazon.com>
2a525bb
to
0223104
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #3652 +/- ##
==========================================
- Coverage 66.45% 66.41% -0.05%
==========================================
Files 3208 3209 +1
Lines 61593 61610 +17
Branches 9502 9504 +2
==========================================
- Hits 40932 40916 -16
- Misses 18384 18413 +29
- Partials 2277 2281 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Hey @zhongnansu, Thanks for handling this. However, it still not quite formatted for readability and it dumps the error to the log whereas prior it did not. Would it possible to get it to feature parity ? |
Signed-off-by: Su <szhongna@amazon.com>
@kavilla valid point, found a way to return exact error message as existing dev tool. Please take a look |
CHANGELOG.md
Outdated
@@ -209,6 +209,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | |||
- Fixes management app breadcrumb error ([#2344](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2344)) | |||
- [BUG] Fix suggestion list cutoff issue ([#2607](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2607)) | |||
- [TSVB] Fixes undefined serial diff aggregation documentation link ([#3503](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3503)) | |||
- Fix error message display issue in dev tool console ([#3652](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3652)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this issue introduced with new dev tool change for MD? if so, assume previous version doesn't has such issue, do we still need to callout and add to changelog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's introduced by the dev tool refactor PR, literally it's not even related to MD. It's a good point, previous version doesn't have issue. Currently it's only that each PR is mapped to at least one changelog.
Any thoughts? @kavilla @abbyhu2000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, @seraphjiang is correct - if we're only fixing an unreleased bug, no need for a new changelog entry. In some cases we would maybe want to update the original changelog entry, but in this case, I'd just skip.
And when we generate the release notes, we'll want to do some additional cleanup and consolidation, so that all the MD entries are grouped and nicely formatted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed change log item
Signed-off-by: Su <szhongna@amazon.com>
Signed-off-by: Su <szhongna@amazon.com>
Hey @zhongnansu, looks a lot more human readable! Are we able to resolve the issue with it outputting error logs? For example, on 2.6 if you hit an exception you can check your OpenSearch Dashboards server logs and it does not output anything. But for this I am seeing:
|
Signed-off-by: Su <szhongna@amazon.com>
@kavilla Make sense, since client side will get the error for the user query , no need to print at console server side.I removed the log line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhongnansu On 2.6, the console does not output anything, but when I ran this, i still get some error log output:
server log [19:41:05.242] [error][data][opensearch] [index_not_found_exception]: no such index [my-dql-sample2]
That's because after the refactor, the query request is now going through client provided by routeHander in core. Similar as user render visualization/Discover, it will log the error in core and label it as [data][opensearch]. Fact is user did make a request to OpenSearch and failed, I don't see a issue with core side logging the error. I don't think it's a blocking issue. But if you have concern around UX, you can open another issue for discuss, maybe also in UX repo? I suggest we move forward with this PR. Thanks for bring it up. @abbyhu2000 |
@@ -127,15 +129,22 @@ export const createHandler = ({ | |||
}, | |||
}); | |||
} catch (e: any) { | |||
log.error(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we don't want to log the error? It's good practice to have service logging the errors for analysis or troubleshooting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are logging error by core->openesarch logger, but not by console logger. Because the error response will be forwarded to client(browser). No need to log 2 times
Fix error message display issue in dev tool console When user sends request in the console and result in error, the console will output a customized error message. Signed-off-by: Su <szhongna@amazon.com> (cherry picked from commit 53047b6) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Fix error message display issue in dev tool console When user sends request in the console and result in error, the console will output a customized error message. (cherry picked from commit 53047b6) Signed-off-by: Su <szhongna@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ct#3652) Fix error message display issue in dev tool console When user sends request in the console and result in error, the console will output a customized error message. Signed-off-by: Su <szhongna@amazon.com> Signed-off-by: David Sinclair <david@sinclair.tech>
Description
Updated screenshot
Previous screenshot
Issues Resolved
#3645
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr