Opened 3 years ago

#560 new defect

Osmose editor should handle conflict errors from API

Reported by: jocelyn Owned by: frodrigo
Priority: major Component: osmose-frontend
Keywords: Cc:

Description

When getting an http error 409 from the API, the editor currently crashes. It should be able to recover from the error, and at least print a message to the user about the conflict.

Traceback (most recent call last):
  File "/data/project/osmose/frontend/bottle.py", line 763, in _handle
    return route.call(**args)
  File "/data/project/osmose/frontend/bottle.py", line 1622, in wrapper
    rv = callback(*a, **ka)
  File "/data/project/osmose/frontend/bottle.py", line 1572, in wrapper
    rv = callback(*a, **ka)
  File "/data/project/osmose/frontend/bottle_pgsql.py", line 104, in wrapper
    rv = callback(*args, **kwargs)
  File "/data/project/osmose/frontend/bottle_gettext.py", line 105, in wrapper
    return callback(*args, **kwargs)
  File "/data/project/osmose/frontend/editor.py", line 94, in save
    _changeset_upload(changeset, osmchange)
  File "/data/project/osmose/frontend/editor.py", line 132, in _changeset_upload
    osmchange)
  File "/data/project/osmose/frontend/tools/oauth.py", line 65, in post
    raise Exception(resp.status_code)
Exception: 409

Change History (0)

Note: See TracTickets for help on using tickets.