Fix #568 Notification UI not updated

Fix another issue with REST save function : if your doc has "code" and "message" properties, for this function that mean it's an error.