-
Notifications
You must be signed in to change notification settings - Fork 994
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
[refactor] move code from MetricsDataController to MetricsService #2437
[refactor] move code from MetricsDataController to MetricsService #2437
Conversation
public MetricsData getMetricsData(Long monitorId, String metrics) { | ||
boolean available = realTimeDataReader.isServerAvailable(); | ||
if (!available) { | ||
throw new CommonException("real time store not available"); |
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.
Looks like this CommonException
is not catched by MetricsDataController
.
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.
CommonException
is caught by the GlobalExceptionHandler
in Manager
, making sure it is the same as before, and throwing an exception forward when it is not available
|
||
/** | ||
* | ||
*/ |
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.
Could you help complete comment here?
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.
okay
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.
lgtm
What's changed?
Checklist
Add or update API