Refactor error handling in FalukantService and enhance user feedback in HealthView
- Changed error throwing in FalukantService to use PreconditionError for better clarity. - Added translations for "too close" error in both German and English locales. - Improved user feedback in HealthView by displaying error messages in a dialog upon measure execution failure.
This commit is contained in:
@@ -4180,7 +4180,7 @@ class FalukantService extends BaseService {
|
||||
limit: 1
|
||||
});
|
||||
if (lastHealthActivity) {
|
||||
throw new Error('too close');
|
||||
throw new PreconditionError('tr:falukant.healthview.errors.tooClose');
|
||||
}
|
||||
const activityObject = FalukantService.HEALTH_ACTIVITIES.find((a) => a.tr === activity);
|
||||
if (!activityObject) {
|
||||
|
||||
Reference in New Issue
Block a user