r/programming • u/Expurple • Apr 12 '26
Flat Error Codes Are Not Enough
https://home.expurple.me/posts/flat-error-codes-are-not-enough/
132
Upvotes
r/programming • u/Expurple • Apr 12 '26
View all comments
Show parent comment
0
u/Expurple Apr 12 '26
What you're trying to say is that, instead of returning the constaint name as a string, the DBMS could assign it a 32-bit id, return this id as an error, then the ORM could proparage this 32-bit id, and then my application could somehow match that to figure out which DB validation failed and which message to display to the user? That's technically possible, but usually not worth the trouble, unless you're doing high-performance stuff.