You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure exactly how you'd want to implement this, but the new specific validation errors Mongo 5 gives are super helpful, so for my own use I've just added:
#Patch cryomongo /lib/cryomongo/src/cryomongo/error.cr : 164
if info = error["errInfo"]?.as?(BSON)
puts "Mongo errInfo: \n" + info.to_json
end
The errInfo is deeply nested an unpredictable, so to add it officially to the library should the Error perhaps have property info : BSON??
The text was updated successfully, but these errors were encountered:
Awesome, thanks so much!Sent from my iPhoneOn Oct 8, 2022, at 11:03 AM, Julien Elbaz ***@***.***> wrote:
Hey @atlantis 👋
the new specific validation errors Mongo 5 gives are super helpful
True, thanks for pointing this out!
The errInfo is deeply nested an unpredictable, so to add it officially to the library should the Error perhaps have property info : BSON
I added a @details getter populated by the errInfo field in this commit: 9f77126 and released v0.3.11 which includes the change.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
Not sure exactly how you'd want to implement this, but the new specific validation errors Mongo 5 gives are super helpful, so for my own use I've just added:
#Patch cryomongo /lib/cryomongo/src/cryomongo/error.cr : 164
if info = error["errInfo"]?.as?(BSON)
puts "Mongo errInfo: \n" + info.to_json
end
The errInfo is deeply nested an unpredictable, so to add it officially to the library should the Error perhaps have
property info : BSON?
?The text was updated successfully, but these errors were encountered: