Skip to content

Commit

Permalink
Merge pull request #272 from oda-hub/more_info_connection_issue
Browse files Browse the repository at this point in the history
More info connection issue
  • Loading branch information
burnout87 authored Nov 5, 2021
2 parents 52c6a14 + 80d6ea8 commit 9593ae7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions cdci_data_analysis/analysis/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,19 +300,22 @@ def run_query(self, product_type,
raise
except InternalError as e:
if hasattr(e, 'message') and e.message is not None:
e_message = e.message
message = e.message
else:
e_message = ('Your request produced an unusual result. It might not be what you expected. '
message = ('Your request produced an unusual result. It might not be what you expected. '
'It is possible that this particular parameter selection should indeed lead to this outcome '
'(e.g. there is no usable data). Please look carefully on your request.\n'
'(e.g. there is no usable data). Please look carefully on your request.\n\n'
'It is also possible that the platform experienced a temporary issue. '
'We aim at distinguishing all of such issues and report them clearly, '
'but for now, we unfortunately can not be certain all cases like this are detected. '
'We try to discover on our own and directly address any temporary issue. '
'But some issues might slip past us. If you are willing to help us, '
'please use "provide feedback" button below. We would greatly appreciate it!'
'please use "provide feedback" button below. We would greatly appreciate it!\n\n'
'This additional information might help:\n\n'
)
e_message = f'Instrument: {self.name}, product: {product_type} failed!\n'
query_out.set_failed(product_type,
message=message,
e_message=e_message,
logger=logger,
sentry_client=sentry_client,
Expand Down
2 changes: 1 addition & 1 deletion cdci_data_analysis/analysis/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def test_communication(self, instrument, query_type='Real', logger=None, config=
debug_message=debug_message)

except Exception as e:
raise InternalError()
raise InternalError(None)

status = query_out.get_status()
msg_str = '--> data server communication status: %d' %status
Expand Down

0 comments on commit 9593ae7

Please sign in to comment.