Reorganize code
Pass the real error message to the client, not just the name.
Merge branch 'fix-16-duplicate-update' into develop