startRehabilitation method
override
Implementation
@override
Future<String> startRehabilitation() async {
try {
final result = await _client.startRehabilitationResponsePost();
final resultData = result.data;
if (resultData == null) {
throw RepositoryException(
RepositoryErrorType.notFound,
RepositoryErrorType.notFound.message,
);
}
return resultData.rehabilitationID;
} on RepositoryException catch (_) {
rethrow;
} on DioException catch (error, stackTrace) {
throw await _dioErrorHandler.handleDioError(
error,
stackTrace,
null,
);
} catch (error, stackTrace) {
throw _repositoryErrorHandler.handleUnknownError(error, stackTrace);
}
}