jacksontj / dataman

MIT License
9 stars 4 forks source link

Unique Constraint violations return as a general querty error, should be ValidationError map so we know what key it was in violation #82

Open ghowland opened 6 years ago

ghowland commented 6 years ago

Unique Constraint violations return as a general querty error, should be ValidationError map so we know what key it was in violation.

Error running query: Err=pq: duplicate key value violates unique constraint "constraint_name"

Currently this is returned as Error, I think it should be ValidationError, so that I get the map of fields with this specific field in it. Otherwise I cant know which field it may have been without doing a ton of queries and DB schema inspections (constaint fields, each fields value, test my field values, see which are in violation).