clean up error messages in submit endpoint