hatnote/montage

Importing duplicated files results in internal server error

yarl opened this issue · 3 comments

yarl commented

When posting payload below to /admin/round/<id>/import

{
  "import_method": "selected",
  "file_names": ["Bytom, Rynek 24.jpg","Bytom, Rynek 24.jpg","Bytom, Rynek 24.jpg","Bytom, Rynek 24.jpg","Bytom, Rynek 24.jpg"]
}

Response is 500 with detail: <ExceptionInfo [sqlalchemy.exc.IntegrityError: (...)

It should be handled more gracefully in order to properly handle on front-end.

yarl commented

Should be part of the #141 list.

From the api exception log, this appears to be a duplicate entry error. That shouldn't happen!

I'll add it to the list.

Interestingly, this error occurs only for import_method=selected and does not occur for import_method=gistcsv