Richer APIException for Pulsstory no-duration exclusions
@@ -263,7 +263,7 @@ class PulsstoryService(ServiceBase):
def UploadActivity(self, serviceRecord, activity):
duration = self._getDuration(activity)
if duration is None or duration <= 0:
- raise APIException("Pulsstory does not support trainings without duration.")
+ raise APIException("Pulsstory does not support trainings without duration.", block=True, scope=ServiceExceptionScope.Activity, user_exception=UserException(UserExceptionType.InsufficientData))
# assembly dict to post to pulsstory
uploadData = self._createUploadData(activity, False)
