Dataset onError - better error message?

I’ve been working on my form validation. I see the dataset has the onError callback. Looking at the api - I added this code into my onReady function:

$w("#dataset1").onError((operation, error) => {
let errorOp = operation; // "save"
let errorCode = error.code; // "DS_VALIDATION_ERROR"
let errorMessage = error.message;
console.log("form error: ", errorOp, ", ", errorCode, ", ", errorMessage)
// DatasetError: Some of the elements validation failed
});

This works as expected - i.e. when I know a field is wrong, it prints something to the console.

My question: The message sucks. How do I figure out what exactly the problem is?

Here’s my output:
form error: save , DS_VALIDATION_ERROR , Some of the elements validation failed

Thank you!

https://www.wix.com/corvid/forum/community-discussion/save-ds-validation-error-some-of-the-elements-validation-failed

https://www.wix.com/corvid/forum/community-discussion/save-operation-failed-dataseterror-some-of-the-elements-validation-failed

Hmmm. It seems like by those posts that you might be suggesting my field in the db collection is of a different type than the field in the form. Is that right?

I have 2 fields that are not free text. They are an email address and a phone number. Both of those are text fields in the db collection. That sounds correct to me. Is it not?

Are you saying that if the field type in the db matches the form input element, then the onError callback will provide more useful info??

Thanks for your help!

@wixrunner22

Email is text.
Telephone is number.
https://support.wix.com/en/article/field-type-support-and-limitations-in-the-data-manager