From c237ac053165e4568fbbc2a3b1812cdafa99dde4 Mon Sep 17 00:00:00 2001 From: Adam Marcus Date: Mon, 4 Nov 2024 23:49:23 -0500 Subject: [PATCH] Clearer error message --- src/hosted_db/sqlite.rs | 2 +- tests/e2e_tests/permissions_tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hosted_db/sqlite.rs b/src/hosted_db/sqlite.rs index a047832..4163321 100644 --- a/src/hosted_db/sqlite.rs +++ b/src/hosted_db/sqlite.rs @@ -52,7 +52,7 @@ pub fn query_sqlite( if code.code == rusqlite::ErrorCode::ReadOnly && code.extended_code == 8 => { AybError::NoWriteAccessError { - message: "Attempted to write to a read-only database".to_string(), + message: "Attempted to write to database while in read-only mode".to_string(), } } _ => AybError::from(err), diff --git a/tests/e2e_tests/permissions_tests.rs b/tests/e2e_tests/permissions_tests.rs index c54497f..5444459 100644 --- a/tests/e2e_tests/permissions_tests.rs +++ b/tests/e2e_tests/permissions_tests.rs @@ -98,7 +98,7 @@ pub async fn test_permissions( "INSERT INTO test_table (fname, lname) VALUES (\"first permissions2\", \"last permissions2\");", FIRST_ENTITY_DB, "table", - "Error: Attempted to write to a read-only database", + "Error: Attempted to write to database while in read-only mode", )?; list_databases( &config_path,