edgedb / edgedb-rust

The official Rust binding for EdgeDB
https://edgedb.com
Apache License 2.0
213 stars 26 forks source link

Readable DescriptorMismatch error description #231

Closed Dhghomon closed 1 year ago

Dhghomon commented 1 year ago

Having a go at making this more readable:

https://discord.com/channels/841451783728529451/1002645322239054014/1092097214677004368

Started yesterday with a slightly different approach (a method on the type itself) but seems that implementing Debug manually while changing the Uuids to the type names is probably the simplest.

Also changes "unexpected type {:?}, expected {}" to "unexpected type {:?} returned from EdgeDB, client expected {}"

tailhook commented 1 year ago

Maybe we can do a newtype around uuid for this case, and implement Debug for that? Instead of reimplementing Debug for every type?

Dhghomon commented 1 year ago

That was another thought I had and since you did too then I think I'll give it a try. I'll update with those changes tomorrow then.

2023년 4월 5일 (수) 오후 4:56, Paul Colomiets @.***>님이 작성:

Maybe we can do a newtype around uuid for this case, and implement Debug for that? Instead of reimplementing Debug for every type?

— Reply to this email directly, view it on GitHub https://github.com/edgedb/edgedb-rust/pull/231#issuecomment-1497073913, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP2GLYOXDPUYWDBMJHBDBLW7UQSBANCNFSM6AAAAAAWTSWQEE . You are receiving this because you authored the thread.Message ID: @.***>