Skip to content

Commit 8d461c3

Browse files
committed
fix: update error text to be consistent
1 parent 14f5e8c commit 8d461c3

9 files changed

Lines changed: 11 additions & 10 deletions

File tree

testgen/ui/views/connections.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def on_setup_table_group_clicked(*_args) -> None:
181181
connection.save()
182182
message = "Changes have been saved successfully."
183183
except Exception as error:
184-
message = "Error creating connection"
184+
message = "Something went wrong while creating the connection."
185185
success = False
186186
LOG.exception(message)
187187

@@ -269,7 +269,7 @@ def test_connection(self, connection: Connection) -> "ConnectionStatus":
269269
details = error.args[0]
270270
return ConnectionStatus(message="Error attempting the connection.", details=details, successful=False)
271271
except Exception as error:
272-
details = "Try again"
272+
details = "Something went wrong while testing the connection."
273273
if connection.connect_by_key and not connection.private_key:
274274
details = "The private key is missing."
275275
LOG.exception("Error testing database connection")
@@ -472,7 +472,7 @@ def on_close_clicked(_params: dict) -> None:
472472
LOG.info("Table group %s created", table_group.id)
473473
safe_rerun()
474474
except Exception as error:
475-
message = "Error creating table group"
475+
message = "Something went wrong while creating the table group."
476476
success = False
477477
LOG.exception(message)
478478

testgen/ui/views/dialogs/import_metadata_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def on_file_cleared(_payload: dict) -> None:
428428
LOG.exception("Metadata import failed")
429429
result = {
430430
"success": False,
431-
"message": "Import failed due to an unexpected error. Please try again.",
431+
"message": "Something went wrong while importing the metadata.",
432432
}
433433

434434
st.session_state.pop(PREVIEW_SESSION_KEY, None)

testgen/ui/views/hygiene_issues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def source_data_dialog(selected_row):
484484
elif bad_data_status == "ERR":
485485
st.error(bad_data_msg)
486486
elif df_bad is None:
487-
st.error("An unknown error was encountered.")
487+
st.error("Something went wrong while loading the data.")
488488
else:
489489
if bad_data_msg:
490490
st.info(bad_data_msg)

testgen/ui/views/monitors_dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ def on_delete_confirmed(*_args) -> None:
625625
LOG.exception("Failed to delete monitor suite")
626626
set_result({
627627
"success": False,
628-
"message": "Unable to delete monitors for the table group, try again.",
628+
"message": "Something went wrong while deleting the monitors.",
629629
})
630630
safe_rerun(scope="fragment")
631631

testgen/ui/views/profiling_runs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,6 @@ def on_delete_confirmed(*_args) -> None:
229229
LOG.exception("Failed to delete profiling runs")
230230
set_result({
231231
"success": False,
232-
"message": "Unable to delete the selected profiling runs, try again.",
232+
"message": "Something went wrong while deleting the profiling runs.",
233233
})
234234
safe_rerun(scope="fragment")

testgen/ui/views/score_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def recalculate_score_history(definition_id: str) -> None:
243243
st.toast("Scorecard trend recalculated", icon=":material/task_alt:")
244244
except:
245245
LOG.exception(f"Failure recalculating history for scorecard id={definition_id}")
246-
st.toast("Recalculating the trend failed. Try again", icon=":material/error:")
246+
st.toast("Something went wrong while recalculating the trend.", icon=":material/error:")
247247

248248

249249
class ScoreDropNotificationSettingsDialog(NotificationSettingsDialogBase):

testgen/ui/views/table_groups.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ def on_close_clicked(_params: dict) -> None:
341341
safe_rerun()
342342

343343
except IntegrityError:
344+
get_current_session().rollback()
344345
success = False
345346
message = "A Table Group with the same name already exists."
346347
else:

testgen/ui/views/test_results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ def source_data_dialog(selected_row):
890890
elif bad_data_status == "ERR":
891891
st.error(bad_data_msg)
892892
elif df_bad is None:
893-
st.error("An unknown error was encountered.")
893+
st.error("Something went wrong while loading the data.")
894894
else:
895895
if bad_data_msg:
896896
st.info(bad_data_msg)

testgen/ui/views/test_runs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,5 @@ def on_delete_confirmed(*_args) -> None:
246246
safe_rerun()
247247
except Exception:
248248
LOG.exception("Failed to delete test run")
249-
result = {"success": False, "message": "Unable to delete the test run, try again."}
249+
result = {"success": False, "message": "Something went wrong while deleting the test run."}
250250
safe_rerun(scope="fragment")

0 commit comments

Comments
 (0)