We have a couple of related issues with regards to error handling during the RLP upload.
For common errors that we know about, eg. duplicate uploads, uploading road id that doesn't exist, etc. we display proper errors to users.
For less common errors that we had not predicted like inconsistent naming of columns, errors can surface in ways that are not cleanly caught by the code, and never surface up to the user.
Two things need to be done here:
Ensure that errors in the asynchronous process that handles queued jobs are always surfaced to the job, and the job is marked as failed.
Make error handling consistent: right now, some error handling happens before the async queue processing, which gets represented as JSON to the user, and some happens within the queue processing, where errors are displayed on the jobs page. We should ALWAYS redirect user to jobs page and surface errors there, also so that we have a record of all attempted uploads in our Redis job queue.
We have a couple of related issues with regards to error handling during the RLP upload.
For common errors that we know about, eg. duplicate uploads, uploading road id that doesn't exist, etc. we display proper errors to users.
For less common errors that we had not predicted like inconsistent naming of columns, errors can surface in ways that are not cleanly caught by the code, and never surface up to the user.
Two things need to be done here:
Ensure that errors in the asynchronous process that handles queued jobs are always surfaced to the job, and the job is marked as failed.
Make error handling consistent: right now, some error handling happens before the async queue processing, which gets represented as JSON to the user, and some happens within the queue processing, where errors are displayed on the
jobs
page. We should ALWAYS redirect user tojobs
page and surface errors there, also so that we have a record of all attempted uploads in our Redis job queue.