Skip to content

Commit

Permalink
Improve the error message on import (#31634)
Browse files Browse the repository at this point in the history
Improve when there's a table number conflict. Without overwhelming user
with implementation details about table numbers, give possible suggestions.

GitOrigin-RevId: 31dd58bd7d7008afc9a32c6d2d65f691c76a9bcb
  • Loading branch information
nipunn1313 authored and Convex, Inc. committed Nov 19, 2024
1 parent c72cee3 commit 04607fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/database/src/bootstrap_model/import_facing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ impl<'a, RT: Runtime> ImportFacingModel<'a, RT> {
ErrorMetadata::bad_request(
"ImportConflict",
format!(
"_id {s} cannot be imported into '{table_name}' because its IDs have a \
different format"
"_id {s} cannot be imported into '{table_name}' because it came from a \
different deployment and conflict with preexisting tables in this \
deployment. Try deleting preexisting tables or importing into an empty
deployment."
)
)
);
Expand Down

0 comments on commit 04607fe

Please sign in to comment.