Skip to content

Commit 1f0c9df

Browse files
committed
sqld: improve conn.is_primary error message
1 parent 8f6df20 commit 1f0c9df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libsql-server/src/rpc/proxy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ impl Proxy for ProxyService {
635635
Ok(conn) => {
636636
if !conn.is_primary() {
637637
return Err(tonic::Status::failed_precondition(
638-
"cannot run schema migration against a replica",
638+
"cannot run schema migration against a replica from a replica",
639639
));
640640
}
641641

@@ -710,7 +710,7 @@ impl Proxy for ProxyService {
710710
Ok(conn) => {
711711
if !conn.is_primary() {
712712
return Err(tonic::Status::failed_precondition(
713-
"cannot run schema migration against a replica",
713+
"cannot run schema migration against a replica from a replica",
714714
));
715715
}
716716

libsql-server/tests/cluster/schema_dbs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn schema_migration_basics() {
131131
}
132132

133133
#[test]
134-
fn error_on_replicate() {
134+
fn schema_migration_via_replica() {
135135
let mut sim = Builder::new()
136136
.simulation_duration(Duration::from_secs(1000))
137137
.build();

0 commit comments

Comments
 (0)