Open nich-frai opened 3 weeks ago
I'm having a similar issue with postgres Enum
. Mine failed with the following message.
node:internal/process/promises:394
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: error serializing parameter 1: cannot convert between the Rust type `encore_runtime_core::sqldb::val::RowValue` and the Postgres type `user_role`] {
code: 'GenericFailure'
}
Thanks for the report. Will take a look at fixing this tomorrow. In the meantime you can work around it by casting the column to text SELECT my_enum::text [...]
.
[BUG?] Parsing custom postgres ENUM types in Rust daemon
How to reproduce:
Create a migration using postgres native ENUM type:
Use the native dabatabse client provided by encore
export const db = new SQLDatabase("some_db", { migrations : "./migrations"});
At this point the rust daemon fails with the following message:
Inserting into the table/database does not reproduce this error, only while parsing/selecting from it!
Environment
Just ask if any other information would help!