Fix an error in edit popup, add error handling for previewing routes.
Fix an error in edit popup, add error handling for previewing routes.

christabor/flask_jsondash,christabor/flask_jsondash,christabor/flask_jsondash