cubicweb-wsme #4667244 Some validationError lead to internal error [open]

In some case, at least the following one, the server will return with a 500 error.

On our API, we have an Avatar entity, with a 'image' relation to a 'File' entity. When creating a File by updating an Avatar, forgetting the 'data_name' or the 'data_format' raises this error:

2014-12-01 17:39:59 - (waitress) ERROR: Exception when serving /https/api/0.1/avatar/545163 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/waitress/channel.py", line 337, in service task.service() File "/usr/local/lib/python2.7/dist-packages/waitress/task.py", line 173, in service self.execute() File "/usr/local/lib/python2.7/dist-packages/waitress/task.py", line 392, in execute appiter = self.channel.server.application(env, startresponse) File "/usr/local/lib/python2.7/dist-packages/wsgicors.py", line 116, in __call return self.application(environ, customstartresponse) File "/usr/local/lib/python2.7/dist-packages/pyramid/router.py", line 242, in __call response = self.invokesubrequest(request, usetweens=True) File "/usr/local/lib/python2.7/dist-packages/pyramid/router.py", line 217, in invoke_subrequest response = handle_request(request) File "/usr/local/lib/python2.7/dist-packages/pyramid/tweens.py", line 21, in excview_tween response = handler(request) File "/usr/local/lib/python2.7/dist-packages/pyramid_cubicweb/bwcompat.py", line 122, in __call response = self.cwhandler(request) File "/usr/local/lib/python2.7/dist-packages/pyramidcubicweb/bwcompat.py", line 68, in _call txuuid = req.cnx.commit() File "/usr/local/lib/python2.7/dist-packages/cubicweb/repoapi.py", line 129, in check_open return func(clt_cnx, args, *kwargs) File "/usr/local/lib/python2.7/dist-packages/cubicweb/repoapi.py", line 224, in commit return self._cnx.commit(args, *kwargs) File "/usr/local/lib/python2.7/dist-packages/cubicweb/server/session.py", line 381, in check_open return func(cnx, args, *kwargs) File "/usr/local/lib/python2.7/dist-packages/cubicweb/server/session.py", line 1079, in commit raise QueryError('transaction must be rolled back') QueryError: transaction must be rolled back

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 7); <em>backlink</em></p>
Inline emphasis start-string without end-string.
ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 7); <em>backlink</em></p>
Inline emphasis start-string without end-string.
ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 7); <em>backlink</em></p>
Inline emphasis start-string without end-string.
prioritynormal
typebug
done in<not specified>
closed by<not specified>