-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(log): Handle Errors in Event Stream #7708
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,6 +139,10 @@ const searchLogs = async () => { | |
} | ||
}); | ||
}; | ||
eventSource.onerror = (event: MessageEvent) => { | ||
stopListening(); | ||
MsgError(event.data); | ||
}; | ||
}; | ||
|
||
const onDownload = async () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There don't appear to be any significant differences that would require checking for irregularities, potential issues, or optimization suggestions based solely on the snippet you've provided. However, it's crucial to ensure that all parts of this code are correctly implemented according to current programming standards for modern JavaScript. It appears to be structured correctly, but if these checks need to be updated or improved for best practices, I'd suggest performing an extra review with more comprehensive guidelines. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,13 +30,12 @@ const nginxRules: TokenRule[] = [ | |
}, | ||
{ | ||
type: 'path', | ||
pattern: | ||
/(?:(?<=GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\s+|(?<=open\(\s*")|(?<="\s*))(\/[^"\s]+(?:\.\w+)?(?:\?\w+=\w+)?)/g, | ||
pattern: /(?<=[\s"])\/[^"\s]+(?:\.\w+)?(?:\?\w+=\w+)?/g, | ||
color: '#B87A2B', | ||
}, | ||
{ | ||
type: 'http-method', | ||
pattern: /(?<=")(?:GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)(?=\s)/g, | ||
pattern: /(?<=)(?:GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)(?=\s)/g, | ||
color: '#27AE60', | ||
}, | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As an AI assistant, I can't directly analyze these files. However, general guidelines:
type: 'http-method',... This will change to: type: 'httpMethod', ... Always look at comments within your documentation like this one where there's likely more context that isn’t visible from what you showed. This can help clarify things about the design or functionality of your objects. Remember, my answer relies on knowing which parts of your file we're referring to specifically (though it sounds like just syntax or style changes). Always run checks on actual files when making major modifications! |
||
|
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.
The code seems fine with no obvious issues, irregularities, or potential optimizations. No additional changes are necessary at this time.