-
Notifications
You must be signed in to change notification settings - Fork 715
fix: 4021 logs page additional error information #4029
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
Conversation
WalkthroughThe changes include updates to a dependency version and significant enhancements in error handling across a Vue.js application. The Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SearchResult
participant API
participant useLogs
User->>SearchResult: Initiate search
SearchResult->>API: Send search request
API-->>SearchResult: Response with error or data
SearchResult->>useLogs: Log error if present
useLogs-->>SearchResult: Update error message (including TraceID)
SearchResult->>User: Display search results or error message
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 6
Outside diff range, codebase verification and nitpick comments (1)
web/src/plugins/logs/SearchResult.vue (1)
468-468: TheSanitizedHtmlRenderercomponent is imported and registered but not used within the template.
- Ensure that the
SanitizedHtmlRenderercomponent is utilized within the template section ofSearchResult.vue.Analysis chain
Verify import path and usage of
SanitizedHtmlRenderer.Ensure the import path
@/components/SanitizedHtmlRenderer.vueis correct and the component is used appropriately within the file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence and usage of `SanitizedHtmlRenderer`. # Test: Check if the component file exists. Expect: File exists. fd SanitizedHtmlRenderer.vue # Test: Search for the usage of the component within the file. Expect: Usage found. rg --type vue 'SanitizedHtmlRenderer' web/src/plugins/logs/SearchResult.vueLength of output: 179
Script:
#!/bin/bash # Description: Verify the existence and usage of `SanitizedHtmlRenderer`. # Test: Check if the component file exists. Expect: File exists. fd SanitizedHtmlRenderer.vue # Test: Search for the usage of the component within the file. Expect: Usage found. rg 'SanitizedHtmlRenderer' web/src/plugins/logs/SearchResult.vueLength of output: 243
Script:
#!/bin/bash # Description: Verify the detailed usage of `SanitizedHtmlRenderer` within the template or script sections. # Test: Search for the detailed usage of the component within the file. Expect: Usage found in template or script sections. rg 'SanitizedHtmlRenderer' -A 10 web/src/plugins/logs/SearchResult.vueLength of output: 658
Script:
#!/bin/bash # Description: Verify the usage of `SanitizedHtmlRenderer` within the template section. # Test: Search for the usage of the component within the template section. Expect: Usage found. rg '<SanitizedHtmlRenderer' -A 10 web/src/plugins/logs/SearchResult.vueLength of output: 73
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
web/package-lock.jsonis excluded by!**/package-lock.json
Files selected for processing (3)
- web/package.json (1 hunks)
- web/src/composables/useLogs.ts (22 hunks)
- web/src/plugins/logs/SearchResult.vue (3 hunks)
Files skipped from review due to trivial changes (1)
- web/package.json
Additional context used
Biome
web/src/composables/useLogs.ts
[error] 1841-1841: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
Additional comments not posted (7)
web/src/plugins/logs/SearchResult.vue (1)
481-481: LGTM! Component registration is correct.The
SanitizedHtmlRenderercomponent is correctly registered in the components object.web/src/composables/useLogs.ts (6)
1834-1835: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.
1846-1847: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.Tools
Biome
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
2290-2291: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.
2304-2305: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.
3248-3249: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.
3261-3262: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.
| searchObj.data.errorMsg = err.message + " TraceID:" + err?.trace_id; | ||
| if (err.hasOwnProperty("trace_id")) { |
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.
Avoid using hasOwnProperty directly from the object.
It's recommended to use Object.hasOwn() instead of Object.prototype.hasOwnProperty.
- if (err.hasOwnProperty("trace_id")) {
+ if (Object.hasOwn(err, "trace_id")) {Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| searchObj.data.errorMsg = err.message + " TraceID:" + err?.trace_id; | |
| if (err.hasOwnProperty("trace_id")) { | |
| searchObj.data.errorMsg = err.message + " TraceID:" + err?.trace_id; | |
| if (Object.hasOwn(err, "trace_id")) { |
| searchObj.data.queryResults.error = | ||
| "Error while search partition. Search query is invalid."; |
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.
Improve error message clarity.
The error message could be more specific to help with debugging.
- searchObj.data.queryResults.error = "Error while search partition. Search query is invalid.";
+ searchObj.data.queryResults.error = "Error while searching partition. The search query is invalid. Please check the query syntax.";Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| searchObj.data.queryResults.error = | |
| "Error while search partition. Search query is invalid."; | |
| searchObj.data.queryResults.error = "Error while searching partition. The search query is invalid. Please check the query syntax."; |
| notificationMsg.value = | ||
| "An error occurred while constructing the search query."; |
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.
Improve error message clarity.
The error message could be more specific to help with debugging.
- notificationMsg.value = "An error occurred while constructing the search query.";
+ notificationMsg.value = "An error occurred while constructing the search query. Please check the syntax and try again.";Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| notificationMsg.value = | |
| "An error occurred while constructing the search query."; | |
| notificationMsg.value = | |
| "An error occurred while constructing the search query. Please check the syntax and try again."; |
| let trace_id = ""; | ||
| searchObj.data.errorMsg = |
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.
Avoid using hasOwnProperty directly from the object.
It's recommended to use Object.hasOwn() instead of Object.prototype.hasOwnProperty.
- if (err.response.data.hasOwnProperty("trace_id")) {
+ if (Object.hasOwn(err.response.data, "trace_id")) {Committable suggestion was skipped due to low confidence.
| let trace_id = ""; | ||
| searchObj.data.errorMsg = "Error while processing search request."; |
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.
Avoid using hasOwnProperty directly from the object.
It's recommended to use Object.hasOwn() instead of Object.prototype.hasOwnProperty.
- if (err.response.data.hasOwnProperty("trace_id")) {
+ if (Object.hasOwn(err.response.data, "trace_id")) {Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| let trace_id = ""; | |
| searchObj.data.errorMsg = "Error while processing search request."; | |
| let trace_id = ""; | |
| searchObj.data.errorMsg = "Error while processing search request."; | |
| if (Object.hasOwn(err.response.data, "trace_id")) { |
| if (err.hasOwnProperty("trace_id")) { | ||
| trace_id = err?.trace_id; |
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.
Avoid using hasOwnProperty directly from the object.
It's recommended to use Object.hasOwn() instead of Object.prototype.hasOwnProperty.
- if (err.hasOwnProperty("trace_id")) {
+ if (Object.hasOwn(err, "trace_id")) {Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (err.hasOwnProperty("trace_id")) { | |
| trace_id = err?.trace_id; | |
| if (Object.hasOwn(err, "trace_id")) { | |
| trace_id = err?.trace_id; |
Tools
Biome
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
c6eb013 to
81c33af
Compare
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.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- web/src/composables/useLogs.ts (22 hunks)
- web/src/plugins/logs/SearchResult.vue (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- web/src/plugins/logs/SearchResult.vue
Additional context used
Biome
web/src/composables/useLogs.ts
[error] 1841-1841: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
Additional comments not posted (6)
web/src/composables/useLogs.ts (6)
1019-1020: Improve error message clarity.The error message could be more specific to help with debugging.
- notificationMsg.value = "An error occurred while constructing the search query."; + notificationMsg.value = "An error occurred while constructing the search query. Please check the syntax and try again.";
1049-1050: Improve error message clarity.The error message could be more specific to help with debugging.
- searchObj.data.queryResults.error = "Error while search partition. Search query is invalid."; + searchObj.data.queryResults.error = "Error while searching partition. The search query is invalid. Please check the query syntax.";
1834-1835: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {
1846-1847: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {Tools
Biome
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
2124-2125: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {
2138-2139: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {
| let trace_id = ""; | ||
| searchObj.data.histogram.errorMsg = |
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.
Avoid using hasOwnProperty directly from the object.
It's recommended to use Object.hasOwn() instead of Object.prototype.hasOwnProperty.
- if (err.response.data.hasOwnProperty("trace_id")) {
+ if (Object.hasOwn(err.response.data, "trace_id")) {Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| let trace_id = ""; | |
| searchObj.data.histogram.errorMsg = | |
| let trace_id = ""; | |
| searchObj.data.histogram.errorMsg = | |
| if (Object.hasOwn(err.response.data, "trace_id")) { |
| searchObj.data.histogram.errorMsg = | ||
| err.message + " TraceID:" + err?.trace_id; |
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.
Avoid using hasOwnProperty directly from the object.
It's recommended to use Object.hasOwn() instead of Object.prototype.hasOwnProperty.
- if (err.hasOwnProperty("trace_id")) {
+ if (Object.hasOwn(err, "trace_id")) {Committable suggestion was skipped due to low confidence.
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.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/src/composables/useLogs.ts (23 hunks)
Additional context used
Biome
web/src/composables/useLogs.ts
[error] 1841-1841: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
Additional comments not posted (8)
web/src/composables/useLogs.ts (8)
1019-1020: Improve error message clarity.The error message could be more specific to help with debugging.
- notificationMsg.value = "An error occurred while constructing the search query."; + notificationMsg.value = "An error occurred while constructing the search query. Please check the syntax and try again.";
1049-1050: Improve error message clarity.The error message could be more specific to help with debugging.
- searchObj.data.queryResults.error = "Error while search partition. Search query is invalid."; + searchObj.data.queryResults.error = "Error while searching partition. The search query is invalid. Please check the query syntax.";
1841-1841: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {Tools
Biome
[error] 1841-1841: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
1846-1847: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {Tools
Biome
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
2124-2125: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {
2138-2139: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {
2290-2291: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {
2304-2305: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {
| let trace_id = ""; | ||
| searchObj.data.errorMsg = "Error while processing search request."; |
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.
Avoid using hasOwnProperty directly from the object.
It's recommended to use Object.hasOwn() instead of Object.prototype.hasOwnProperty.
- if (err.response.data.hasOwnProperty("trace_id")) {
+ if (Object.hasOwn(err.response.data, "trace_id")) {Committable suggestion was skipped due to low confidence.
| trace_id = err?.trace_id; | ||
| } |
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.
Avoid using hasOwnProperty directly from the object.
It's recommended to use Object.hasOwn() instead of Object.prototype.hasOwnProperty.
- if (err.hasOwnProperty("trace_id")) {
+ if (Object.hasOwn(err, "trace_id")) {Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| trace_id = err?.trace_id; | |
| } | |
| if (Object.hasOwn(err, "trace_id")) { | |
| trace_id = err?.trace_id; | |
| } |
aa45594 to
0e2c0e8
Compare
…/github.com/openobserve/openobserve into 4021-logs-page-additional-error-information
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
web/src/plugins/logs/Index.vue (1)
102-105: Sanitize the content rendered byv-htmlinweb/src/plugins/logs/Index.vue.The
v-htmldirective inweb/src/plugins/logs/Index.vueat line 102 usessearchObj.data.filterErrMsgwithout sanitization. This poses a potential XSS vulnerability. Please ensure the content is sanitized using a method likeDOMPurify.sanitize.
- File:
web/src/plugins/logs/Index.vue- Line: 102
- Code:
v-html="searchObj.data.filterErrMsg"Consider using:
v-html="DOMPurify.sanitize(searchObj.data.filterErrMsg)"Analysis chain
LGTM! But verify the usage of
v-html.The changes are approved. Ensure that the
v-htmlcontent is sanitized to prevent XSS attacks.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `v-html` to ensure content is sanitized. # Test: Search for v-html usage. Expect: Sanitization of content. rg --type vue 'v-html'Length of output: 50
Script:
#!/bin/bash # Description: Verify the usage of `v-html` to ensure content is sanitized. # Test: Search for v-html usage in .vue files. Expect: Sanitization of content. rg 'v-html' --glob '*.vue'Length of output: 746
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
web/package-lock.jsonis excluded by!**/package-lock.json
Files selected for processing (2)
- web/src/composables/useLogs.ts (22 hunks)
- web/src/plugins/logs/Index.vue (9 hunks)
Additional context used
Biome
web/src/composables/useLogs.ts
[error] 1841-1841: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
Additional comments not posted (13)
web/src/plugins/logs/Index.vue (3)
407-409: LGTM!The
toggleErrorDetailsmethod is straightforward and correctly toggles thedisableMoreErrorDetailsstate.
416-416: LGTM!The
disableMoreErrorDetailsstate is correctly initialized as a reactive boolean variable.
122-137: LGTM! But verify the usage ofSanitizedHtmlRenderer.The changes are approved. Ensure that the
SanitizedHtmlRenderercomponent properly sanitizes the HTML content to prevent XSS attacks.Verification successful
LGTM! The
SanitizedHtmlRenderercomponent properly sanitizes HTML content usingDOMPurify.The changes are approved. The use of
DOMPurifyensures that the HTML content is sanitized, preventing potential XSS attacks.
- The
SanitizedHtmlRenderercomponent is implemented correctly to sanitize HTML content.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `SanitizedHtmlRenderer` to ensure content is sanitized. # Test: Search for SanitizedHtmlRenderer usage. Expect: Proper sanitization of content. rg --type vue 'SanitizedHtmlRenderer'Length of output: 65
Script:
#!/bin/bash # Description: Verify the usage of `SanitizedHtmlRenderer` to ensure content is sanitized. # Find all .vue files and search for SanitizedHtmlRenderer usage within them fd -e vue -x rg 'SanitizedHtmlRenderer' {}Length of output: 1540
Script:
#!/bin/bash # Description: Verify the implementation of SanitizedHtmlRenderer to ensure content is sanitized. # Locate and display the implementation of SanitizedHtmlRenderer.vue fd 'SanitizedHtmlRenderer.vue' -x cat {}Length of output: 1155
web/src/composables/useLogs.ts (10)
1019-1020: Improve error message clarity.The error message could be more specific to help with debugging.
- notificationMsg.value = "An error occurred while constructing the search query."; + notificationMsg.value = "An error occurred while constructing the search query. Please check the syntax and try again.";
1049-1050: Improve error message clarity.The error message could be more specific to help with debugging.
- searchObj.data.queryResults.error = "Error while search partition. Search query is invalid."; + searchObj.data.queryResults.error = "Error while searching partition. The search query is invalid. Please check the query syntax.";
1834-1835: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {
1846-1847: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {Tools
Biome
[error] 1846-1846: Do not access Object.prototype method 'hasOwnProperty' from target object.
It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.(lint/suspicious/noPrototypeBuiltins)
2124-2125: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {
2138-2139: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {
2290-2291: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {
2304-2305: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {
3248-3249: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.response.data.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err.response.data, "trace_id")) {
3261-3262: Avoid usinghasOwnPropertydirectly from the object.It's recommended to use
Object.hasOwn()instead ofObject.prototype.hasOwnProperty.- if (err.hasOwnProperty("trace_id")) { + if (Object.hasOwn(err, "trace_id")) {
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/src/plugins/logs/Index.vue (9 hunks)
Files skipped from review as they are similar to previous changes (1)
- web/src/plugins/logs/Index.vue
Summary by CodeRabbit
New Features
SanitizedHtmlRendererfor improved and secure HTML content rendering in search results.Enhancements
Bug Fixes
Chores
rudder-sdk-jsto a specific version, potentially impacting update capabilities.