Skip to content
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: OPTIC-925: revert #6660

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions label_studio/core/feature_flags/stale_feature_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'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: 5 additions & 1 deletion label_studio/ml/api_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@
response = self.get(url=url, *args, **kwargs)
response.raise_for_status()
except requests.exceptions.RequestException as e:
error_string = str(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 '')

Check warning on line 164 in label_studio/ml/api_connector.py

View check run for this annotation

Codecov / codecov/patch

label_studio/ml/api_connector.py#L164

Added line #L164 was not covered by tests
else:
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
Loading