Skip to content

Commit

Permalink
refactor: OPTIC-925: Remove Stale Feature Flag - fix_back_dev_3351_ml…
Browse files Browse the repository at this point in the history
…_validation_error_extension_short
  • Loading branch information
luarmr committed Nov 13, 2024
1 parent 61afa10 commit 1907d71
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion label_studio/core/feature_flags/stale_feature_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
'fflag_fix_front_dev_3617_taxonomy_memory_leaks_fix': True,
'ff_back_dev_2915_storage_nginx_proxy_26092022_short': True,
'fflag_fix_front_dev_3350_restrict_drawing_area_short': True,
'fix_back_dev_3351_ml_validation_error_extension_short': False,
'fflag_feat_front_dev_2984_dm_draggable_columns_short': True,
'fflag_feat_front_dev_2461_audio_paragraphs_seek_chunk_position_short': True,
'fflag-feat-front-dev-2982-label-weights-settings': True,
Expand Down
6 changes: 1 addition & 5 deletions label_studio/ml/api_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,7 @@ def _request(self, url_suffix, request=None, verbose=True, method='POST', *args,
response = self.get(url=url, *args, **kwargs)
response.raise_for_status()
except requests.exceptions.RequestException as e:
# Extending error details in case of failed request
if flag_set('fix_back_dev_3351_ml_validation_error_extension_short', AnonymousUser):
error_string = str(e) + (' ' + str(response.text) if response else '')
else:
error_string = str(e)
error_string = str(e)
status_code = response.status_code if response is not None else 0
return MLApiResult(url, request, {'error': error_string}, headers, 'error', status_code=status_code)
status_code = response.status_code
Expand Down

0 comments on commit 1907d71

Please sign in to comment.