Closed unidesigner closed 9 months ago
Yes, I suppose we can go inside the surrealdb query response and extract the error message.
Great idea.
That would be fantastic! Right now, it's quite cumbersome to rerun the migration file manually and parse the errors.
AFAIK, there's no error message there to extract.
See https://github.com/surrealdb/surrealdb/issues/2888
But printing the whole query of the failed transaction would definitely help.
I have released the v1.0.1 crate which should now display the list of error messages when a migration fails.
@Odonno: I tried to compile v1.0.1. create with
cargo install surrealdb-migrations@1.0.1
but ran into a compile error
error[E0658]: use of unstable library feature 'build_hasher_simple_hash_one'
--> /home/stephan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ordered-multimap-0.7.1/src/list_ordered_multimap.rs:3288:34
|
3288 | let hash = self.build_hasher.hash_one(key);
| ^^^^^^^^
|
= note: see issue #86161 <https://github.com/rust-lang/rust/issues/86161> for more information
For more information about this error, try `rustc --explain E0658`.
error: could not compile `ordered-multimap` (lib) due to 27 previous errors
Any idea how to fix this?
No problem on my end. What is your version of Rust? Can you try to upgrade to the latest version of Rust and see if the error disappear?
Updating Rust fixed the error. Thanks.
When a migration fails with
I'd like to see a more verbose error message what the reason was for the failed transaction. Would it be possible to display this information?